From 64e8b94bdf6c5e96bd2e273780521368ffce468d Mon Sep 17 00:00:00 2001 From: erdem Date: Thu, 9 Oct 2025 19:09:55 +0200 Subject: [PATCH 1/2] Standardize error responses per id (#212) --- openapi/openapi.yaml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/openapi/openapi.yaml b/openapi/openapi.yaml index fcf805e..972fdcd 100644 --- a/openapi/openapi.yaml +++ b/openapi/openapi.yaml @@ -91,10 +91,22 @@ paths: $ref: "#/components/schemas/DereferencingResult" "400": description: Invalid DID or DID URL. + content: + application/problem+json: + schema: + $ref: "#/components/schemas/RFC9457ProblemDetails" "404": description: DID or DID URL not found. + content: + application/problem+json: + schema: + $ref: "#/components/schemas/RFC9457ProblemDetails" "406": description: Representation not supported. + content: + application/problem+json: + schema: + $ref: "#/components/schemas/RFC9457ProblemDetails" "410": description: Successfully resolved, but DID is deactivated. content: @@ -108,10 +120,21 @@ paths: application/did-url-dereferencing: schema: $ref: "#/components/schemas/DereferencingResult" + application/problem+json: + schema: + $ref: "#/components/schemas/RFC9457ProblemDetails" "500": description: Internal Error. + content: + application/problem+json: + schema: + $ref: "#/components/schemas/RFC9457ProblemDetails" "501": description: DID method not supported. + content: + application/problem+json: + schema: + $ref: "#/components/schemas/RFC9457ProblemDetails" components: schemas: ResolutionOptions: @@ -213,4 +236,4 @@ components: type: string instance: type: string - additionalProperties: { } + additionalProperties: { } \ No newline at end of file From c57472ece007c852725cd4283a94ffe2e0d529f2 Mon Sep 17 00:00:00 2001 From: erdem Date: Sun, 26 Oct 2025 11:14:56 +0100 Subject: [PATCH 2/2] Update error responses to reference ResolutionResult per WG decision --- openapi/openapi.yaml | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/openapi/openapi.yaml b/openapi/openapi.yaml index 0a03435..a9ebdc5 100644 --- a/openapi/openapi.yaml +++ b/openapi/openapi.yaml @@ -150,21 +150,30 @@ paths: "400": description: Invalid DID or DID URL. content: - application/problem+json: + application/did-resolution: + schema: + $ref: "#/components/schemas/ResolutionResult" + application/did-url-dereferencing: schema: - $ref: "#/components/schemas/RFC9457ProblemDetails" + $ref: "#/components/schemas/DereferencingResult" "404": description: DID or DID URL not found. content: - application/problem+json: + application/did-resolution: schema: - $ref: "#/components/schemas/RFC9457ProblemDetails" + $ref: "#/components/schemas/ResolutionResult" + application/did-url-dereferencing: + schema: + $ref: "#/components/schemas/DereferencingResult" "406": description: Representation not supported. content: - application/problem+json: + application/did-resolution: + schema: + $ref: "#/components/schemas/ResolutionResult" + application/did-url-dereferencing: schema: - $ref: "#/components/schemas/RFC9457ProblemDetails" + $ref: "#/components/schemas/DereferencingResult" "410": description: Successfully resolved, but DID is deactivated. content: @@ -178,21 +187,24 @@ paths: application/did-url-dereferencing: schema: $ref: "#/components/schemas/DereferencingResult" - application/problem+json: - schema: - $ref: "#/components/schemas/RFC9457ProblemDetails" "500": description: Internal Error. content: - application/problem+json: + application/did-resolution: + schema: + $ref: "#/components/schemas/ResolutionResult" + application/did-url-dereferencing: schema: - $ref: "#/components/schemas/RFC9457ProblemDetails" + $ref: "#/components/schemas/DereferencingResult" "501": description: DID method not supported. content: - application/problem+json: + application/did-resolution: + schema: + $ref: "#/components/schemas/ResolutionResult" + application/did-url-dereferencing: schema: - $ref: "#/components/schemas/RFC9457ProblemDetails" + $ref: "#/components/schemas/DereferencingResult" components: schemas: ResolutionOptions: