From fee09d672a5270b9011bd2dee9a6c2d972392892 Mon Sep 17 00:00:00 2001 From: DaevMithran Date: Fri, 2 Dec 2022 19:20:11 +0530 Subject: [PATCH] feat: Add linted swagger docs --- docs/docs.go | 23 +- docs/swagger.json | 628 ++++++++++++++++++++++++++++++++++++ docs/swagger.yaml | 424 ++++++++++++++++++++++++ services/diddoc_service.go | 8 +- services/request_service.go | 12 +- 5 files changed, 1067 insertions(+), 28 deletions(-) create mode 100644 docs/swagger.json create mode 100644 docs/swagger.yaml diff --git a/docs/docs.go b/docs/docs.go index 8305ab9e..cdfb4962 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -43,8 +43,7 @@ const docTemplate = `{ "parameters": [ { "type": "string", - "example": "did:cheqd:mainnet:zF7rhDBfUt9d1gJPjx7s1JXfUY7oVWkY", - "description": "DID Doc Id", + "description": "did", "name": "did", "in": "path", "required": true @@ -97,18 +96,12 @@ const docTemplate = `{ "parameters": [ { "type": "string", - "example": "did:cheqd:testnet:MjYxNzYKMjYxNzYK", "description": "Resource collection id. DID Doc Id", "name": "did", "in": "path", "required": true }, { - "enum": [ - "application/did+ld+json", - "application/ld+json", - "application/did+json" - ], "type": "string", "description": "The requested media type of the DID document representation or DID resolution result. ", "name": "accept", @@ -162,7 +155,6 @@ const docTemplate = `{ "parameters": [ { "type": "string", - "example": "did:cheqd:testnet:MjYxNzYKMjYxNzYK", "description": "Resource collection id. DID Doc Id", "name": "did", "in": "path", @@ -170,7 +162,6 @@ const docTemplate = `{ }, { "type": "string", - "example": "60ad67be-b65b-40b8-b2f4-3923141ef382", "description": "DID Resource identifier", "name": "resourceId", "in": "path", @@ -238,7 +229,6 @@ const docTemplate = `{ "parameters": [ { "type": "string", - "example": "did:cheqd:testnet:MjYxNzYKMjYxNzYK", "description": "Resource collection id. DID Doc Id", "name": "did", "in": "path", @@ -246,8 +236,7 @@ const docTemplate = `{ }, { "type": "string", - "example": "60ad67be-b65b-40b8-b2f4-3923141ef382", - "description": "DID Resource identifier", + "description": "Resource identifier", "name": "resourceId", "in": "path", "required": true @@ -318,22 +307,20 @@ const docTemplate = `{ "parameters": [ { "type": "string", - "example": "did:cheqd:mainnet:zF7rhDBfUt9d1gJPjx7s1JXfUY7oVWkY", - "description": "DID Doc Id", + "description": "did", "name": "did", "in": "path", "required": true }, { "type": "string", - "example": "#key1", "description": "` + "`" + `#` + "`" + ` + DID Doc Verification Method or Service identifier", "name": "fragmentId", - "in": "path" + "in": "path", + "required": true }, { "type": "string", - "example": "\"service1\"", "description": "Service id", "name": "service", "in": "query" diff --git a/docs/swagger.json b/docs/swagger.json new file mode 100644 index 00000000..4553007e --- /dev/null +++ b/docs/swagger.json @@ -0,0 +1,628 @@ +{ + "swagger": "2.0", + "info": { + "description": "Cheqd DID Resolver API for DID resolution and dereferencing.", + "title": "Cheqd DID Resolver API", + "contact": { + "name": "Cheqd", + "url": "https://cheqd.io" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "1.0" + }, + "paths": { + "/1.0/identifiers/{did}": { + "get": { + "description": "Get DID Doc or its fragment", + "consumes": [ + "application/did+ld+json", + "application/ld+json", + "application/did+json" + ], + "produces": [ + "application/did+ld+json", + "application/ld+json", + "application/did+json" + ], + "tags": [ + "Resolution" + ], + "summary": "Resolve or dereferencing DID Doc", + "parameters": [ + { + "type": "string", + "description": "did", + "name": "did", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/types.DidResolution" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/types.DidResolution" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/types.DidResolution" + } + }, + "406": { + "description": "Not Acceptable", + "schema": { + "$ref": "#/definitions/types.DidResolution" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/types.DidResolution" + } + } + } + } + }, + "/1.0/identifiers/{did}/resources/all": { + "get": { + "description": "Get a list of all collection resources metadata", + "produces": [ + "*/*" + ], + "tags": [ + "Dereferencing" + ], + "summary": "Collection resources", + "parameters": [ + { + "type": "string", + "description": "Resource collection id. DID Doc Id", + "name": "did", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "The requested media type of the DID document representation or DID resolution result. ", + "name": "accept", + "in": "header" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/types.DidDereferencing" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/types.DidDereferencing" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/types.DidDereferencing" + } + }, + "406": { + "description": "Not Acceptable", + "schema": { + "$ref": "#/definitions/types.DidDereferencing" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/types.DidDereferencing" + } + } + } + } + }, + "/1.0/identifiers/{did}/resources/{resourceId}": { + "get": { + "description": "Get resource value without dereferencing wrappers", + "produces": [ + "*/*" + ], + "tags": [ + "Dereferencing" + ], + "summary": "Resource value", + "parameters": [ + { + "type": "string", + "description": "Resource collection id. DID Doc Id", + "name": "did", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "DID Resource identifier", + "name": "resourceId", + "in": "path", + "required": true + }, + { + "enum": [ + "application/did+ld+json", + "application/ld+json", + "application/did+json" + ], + "type": "string", + "description": "The requested media type of the DID document representation or DID resolution result. ", + "name": "accept", + "in": "header" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/types.DidDereferencing" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/types.DidDereferencing" + } + }, + "406": { + "description": "Not Acceptable", + "schema": { + "$ref": "#/definitions/types.DidDereferencing" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/types.DidDereferencing" + } + } + } + } + }, + "/1.0/identifiers/{did}/resources/{resourceId}/metadata": { + "get": { + "description": "Get resource metadata without value by DID Doc", + "produces": [ + "*/*" + ], + "tags": [ + "Dereferencing" + ], + "summary": "Resource metadata", + "parameters": [ + { + "type": "string", + "description": "Resource collection id. DID Doc Id", + "name": "did", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Resource identifier", + "name": "resourceId", + "in": "path", + "required": true + }, + { + "enum": [ + "application/did+ld+json", + "application/ld+json", + "application/did+json" + ], + "type": "string", + "description": "The requested media type of the DID document representation or DID resolution result. ", + "name": "accept", + "in": "header" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/types.DidDereferencing" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/types.DidDereferencing" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/types.DidDereferencing" + } + }, + "406": { + "description": "Not Acceptable", + "schema": { + "$ref": "#/definitions/types.DidDereferencing" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/types.DidDereferencing" + } + } + } + } + }, + "/1.0/identifiers/{did}{fragmentId}": { + "get": { + "description": "Get DID Doc or its fragment", + "consumes": [ + "application/did+ld+json", + "application/ld+json", + "application/did+json" + ], + "produces": [ + "application/did+ld+json", + "application/ld+json", + "application/did+json" + ], + "tags": [ + "Dereferencing" + ], + "summary": "Resolve or dereferencing DID Doc", + "parameters": [ + { + "type": "string", + "description": "did", + "name": "did", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "`#` + DID Doc Verification Method or Service identifier", + "name": "fragmentId", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Service id", + "name": "service", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/types.DidDereferencing" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/types.DidDereferencing" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/types.DidDereferencing" + } + }, + "406": { + "description": "Not Acceptable", + "schema": { + "$ref": "#/definitions/types.DidDereferencing" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/types.DidDereferencing" + } + } + } + } + } + }, + "definitions": { + "types.ContentType": { + "type": "string", + "enum": [ + "application/did+json", + "application/did+ld+json", + "application/ld+json", + "application/json" + ], + "x-enum-varnames": [ + "DIDJSON", + "DIDJSONLD", + "JSONLD", + "JSON" + ] + }, + "types.DereferencedResource": { + "type": "object", + "properties": { + "checksum": { + "type": "string" + }, + "created": { + "type": "string" + }, + "mediaType": { + "type": "string" + }, + "nextVersionId": { + "type": "string" + }, + "previousVersionId": { + "type": "string" + }, + "resourceCollectionId": { + "type": "string" + }, + "resourceId": { + "type": "string" + }, + "resourceName": { + "type": "string" + }, + "resourceType": { + "type": "string" + }, + "resourceURI": { + "type": "string" + } + } + }, + "types.DereferencingMetadata": { + "type": "object", + "properties": { + "contentType": { + "$ref": "#/definitions/types.ContentType" + }, + "did": { + "$ref": "#/definitions/types.DidProperties" + }, + "error": { + "type": "string" + }, + "retrieved": { + "type": "string" + } + } + }, + "types.DidDereferencing": { + "type": "object", + "properties": { + "@context": { + "type": "string", + "example": "https://w3id.org/did-resolution/v1" + }, + "contentMetadata": { + "$ref": "#/definitions/types.ResolutionDidDocMetadata" + }, + "contentStream": {}, + "dereferencingMetadata": { + "$ref": "#/definitions/types.DereferencingMetadata" + } + } + }, + "types.DidDoc": { + "type": "object", + "properties": { + "@context": { + "type": "array", + "items": { + "type": "string" + } + }, + "alsoKnownAs": { + "type": "array", + "items": { + "type": "string" + } + }, + "assertionMethod": { + "type": "array", + "items": { + "type": "string" + } + }, + "authentication": { + "type": "array", + "items": { + "type": "string" + } + }, + "capabilityInvocation": { + "type": "array", + "items": { + "type": "string" + } + }, + "capability_delegation": { + "type": "array", + "items": { + "type": "string" + } + }, + "controller": { + "type": "array", + "items": { + "type": "string" + } + }, + "id": { + "type": "string" + }, + "keyAgreement": { + "type": "array", + "items": { + "type": "string" + } + }, + "service": { + "type": "array", + "items": { + "$ref": "#/definitions/types.Service" + } + }, + "verificationMethod": { + "type": "array", + "items": { + "$ref": "#/definitions/types.VerificationMethod" + } + } + } + }, + "types.DidProperties": { + "type": "object", + "properties": { + "didString": { + "type": "string" + }, + "method": { + "type": "string" + }, + "methodSpecificId": { + "type": "string" + } + } + }, + "types.DidResolution": { + "type": "object", + "properties": { + "@context": { + "type": "string" + }, + "didDocument": { + "$ref": "#/definitions/types.DidDoc" + }, + "didDocumentMetadata": { + "$ref": "#/definitions/types.ResolutionDidDocMetadata" + }, + "didResolutionMetadata": { + "$ref": "#/definitions/types.ResolutionMetadata" + } + } + }, + "types.ResolutionDidDocMetadata": { + "type": "object", + "properties": { + "created": { + "type": "string" + }, + "deactivated": { + "type": "boolean" + }, + "linkedResourceMetadata": { + "type": "array", + "items": { + "$ref": "#/definitions/types.DereferencedResource" + } + }, + "updated": { + "type": "string" + }, + "versionId": { + "type": "string" + } + } + }, + "types.ResolutionMetadata": { + "type": "object", + "properties": { + "contentType": { + "$ref": "#/definitions/types.ContentType" + }, + "did": { + "$ref": "#/definitions/types.DidProperties" + }, + "error": { + "type": "string" + }, + "retrieved": { + "type": "string" + } + } + }, + "types.Service": { + "type": "object", + "properties": { + "@context": { + "type": "array", + "items": { + "type": "string" + } + }, + "id": { + "type": "string" + }, + "serviceEndpoint": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "types.VerificationMethod": { + "type": "object", + "properties": { + "@context": { + "type": "array", + "items": { + "type": "string" + } + }, + "controller": { + "type": "string" + }, + "id": { + "type": "string" + }, + "publicKeyJwk": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "publicKeyMultibase": { + "type": "string" + }, + "type": { + "type": "string" + } + } + } + } +} \ No newline at end of file diff --git a/docs/swagger.yaml b/docs/swagger.yaml new file mode 100644 index 00000000..55b105ed --- /dev/null +++ b/docs/swagger.yaml @@ -0,0 +1,424 @@ +definitions: + types.ContentType: + enum: + - application/did+json + - application/did+ld+json + - application/ld+json + - application/json + type: string + x-enum-varnames: + - DIDJSON + - DIDJSONLD + - JSONLD + - JSON + types.DereferencedResource: + properties: + checksum: + type: string + created: + type: string + mediaType: + type: string + nextVersionId: + type: string + previousVersionId: + type: string + resourceCollectionId: + type: string + resourceId: + type: string + resourceName: + type: string + resourceType: + type: string + resourceURI: + type: string + type: object + types.DereferencingMetadata: + properties: + contentType: + $ref: '#/definitions/types.ContentType' + did: + $ref: '#/definitions/types.DidProperties' + error: + type: string + retrieved: + type: string + type: object + types.DidDereferencing: + properties: + '@context': + example: https://w3id.org/did-resolution/v1 + type: string + contentMetadata: + $ref: '#/definitions/types.ResolutionDidDocMetadata' + contentStream: {} + dereferencingMetadata: + $ref: '#/definitions/types.DereferencingMetadata' + type: object + types.DidDoc: + properties: + '@context': + items: + type: string + type: array + alsoKnownAs: + items: + type: string + type: array + assertionMethod: + items: + type: string + type: array + authentication: + items: + type: string + type: array + capability_delegation: + items: + type: string + type: array + capabilityInvocation: + items: + type: string + type: array + controller: + items: + type: string + type: array + id: + type: string + keyAgreement: + items: + type: string + type: array + service: + items: + $ref: '#/definitions/types.Service' + type: array + verificationMethod: + items: + $ref: '#/definitions/types.VerificationMethod' + type: array + type: object + types.DidProperties: + properties: + didString: + type: string + method: + type: string + methodSpecificId: + type: string + type: object + types.DidResolution: + properties: + '@context': + type: string + didDocument: + $ref: '#/definitions/types.DidDoc' + didDocumentMetadata: + $ref: '#/definitions/types.ResolutionDidDocMetadata' + didResolutionMetadata: + $ref: '#/definitions/types.ResolutionMetadata' + type: object + types.ResolutionDidDocMetadata: + properties: + created: + type: string + deactivated: + type: boolean + linkedResourceMetadata: + items: + $ref: '#/definitions/types.DereferencedResource' + type: array + updated: + type: string + versionId: + type: string + type: object + types.ResolutionMetadata: + properties: + contentType: + $ref: '#/definitions/types.ContentType' + did: + $ref: '#/definitions/types.DidProperties' + error: + type: string + retrieved: + type: string + type: object + types.Service: + properties: + '@context': + items: + type: string + type: array + id: + type: string + serviceEndpoint: + type: string + type: + type: string + type: object + types.VerificationMethod: + properties: + '@context': + items: + type: string + type: array + controller: + type: string + id: + type: string + publicKeyJwk: + additionalProperties: + type: string + type: object + publicKeyMultibase: + type: string + type: + type: string + type: object +info: + contact: + name: Cheqd + url: https://cheqd.io + description: Cheqd DID Resolver API for DID resolution and dereferencing. + license: + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html + title: Cheqd DID Resolver API + version: "1.0" +paths: + /1.0/identifiers/{did}: + get: + consumes: + - application/did+ld+json + - application/ld+json + - application/did+json + description: Get DID Doc or its fragment + parameters: + - description: did + in: path + name: did + required: true + type: string + produces: + - application/did+ld+json + - application/ld+json + - application/did+json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/types.DidResolution' + "400": + description: Bad Request + schema: + $ref: '#/definitions/types.DidResolution' + "404": + description: Not Found + schema: + $ref: '#/definitions/types.DidResolution' + "406": + description: Not Acceptable + schema: + $ref: '#/definitions/types.DidResolution' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/types.DidResolution' + summary: Resolve or dereferencing DID Doc + tags: + - Resolution + /1.0/identifiers/{did}/resources/{resourceId}: + get: + description: Get resource value without dereferencing wrappers + parameters: + - description: Resource collection id. DID Doc Id + in: path + name: did + required: true + type: string + - description: DID Resource identifier + in: path + name: resourceId + required: true + type: string + - description: 'The requested media type of the DID document representation + or DID resolution result. ' + enum: + - application/did+ld+json + - application/ld+json + - application/did+json + in: header + name: accept + type: string + produces: + - '*/*' + responses: + "200": + description: OK + schema: + items: + type: integer + type: array + "400": + description: Bad Request + schema: + $ref: '#/definitions/types.DidDereferencing' + "404": + description: Not Found + schema: + $ref: '#/definitions/types.DidDereferencing' + "406": + description: Not Acceptable + schema: + $ref: '#/definitions/types.DidDereferencing' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/types.DidDereferencing' + summary: Resource value + tags: + - Dereferencing + /1.0/identifiers/{did}/resources/{resourceId}/metadata: + get: + description: Get resource metadata without value by DID Doc + parameters: + - description: Resource collection id. DID Doc Id + in: path + name: did + required: true + type: string + - description: Resource identifier + in: path + name: resourceId + required: true + type: string + - description: 'The requested media type of the DID document representation + or DID resolution result. ' + enum: + - application/did+ld+json + - application/ld+json + - application/did+json + in: header + name: accept + type: string + produces: + - '*/*' + responses: + "200": + description: OK + schema: + $ref: '#/definitions/types.DidDereferencing' + "400": + description: Bad Request + schema: + $ref: '#/definitions/types.DidDereferencing' + "404": + description: Not Found + schema: + $ref: '#/definitions/types.DidDereferencing' + "406": + description: Not Acceptable + schema: + $ref: '#/definitions/types.DidDereferencing' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/types.DidDereferencing' + summary: Resource metadata + tags: + - Dereferencing + /1.0/identifiers/{did}/resources/all: + get: + description: Get a list of all collection resources metadata + parameters: + - description: Resource collection id. DID Doc Id + in: path + name: did + required: true + type: string + - description: 'The requested media type of the DID document representation + or DID resolution result. ' + in: header + name: accept + type: string + produces: + - '*/*' + responses: + "200": + description: OK + schema: + $ref: '#/definitions/types.DidDereferencing' + "400": + description: Bad Request + schema: + $ref: '#/definitions/types.DidDereferencing' + "404": + description: Not Found + schema: + $ref: '#/definitions/types.DidDereferencing' + "406": + description: Not Acceptable + schema: + $ref: '#/definitions/types.DidDereferencing' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/types.DidDereferencing' + summary: Collection resources + tags: + - Dereferencing + /1.0/identifiers/{did}{fragmentId}: + get: + consumes: + - application/did+ld+json + - application/ld+json + - application/did+json + description: Get DID Doc or its fragment + parameters: + - description: did + in: path + name: did + required: true + type: string + - description: '`#` + DID Doc Verification Method or Service identifier' + in: path + name: fragmentId + required: true + type: string + - description: Service id + in: query + name: service + type: string + produces: + - application/did+ld+json + - application/ld+json + - application/did+json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/types.DidDereferencing' + "400": + description: Bad Request + schema: + $ref: '#/definitions/types.DidDereferencing' + "404": + description: Not Found + schema: + $ref: '#/definitions/types.DidDereferencing' + "406": + description: Not Acceptable + schema: + $ref: '#/definitions/types.DidDereferencing' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/types.DidDereferencing' + summary: Resolve or dereferencing DID Doc + tags: + - Dereferencing +swagger: "2.0" diff --git a/services/diddoc_service.go b/services/diddoc_service.go index f76c57f9..c7961fad 100644 --- a/services/diddoc_service.go +++ b/services/diddoc_service.go @@ -68,7 +68,7 @@ func (dds DIDDocService) ProcessDIDRequest(did string, fragmentId string, querie // @Tags Resolution // @Accept application/did+ld+json,application/ld+json,application/did+json // @Produce application/did+ld+json,application/ld+json,application/did+json -// @Param did path string true "DID Doc Id" example(did:cheqd:mainnet:zF7rhDBfUt9d1gJPjx7s1JXfUY7oVWkY) +// @Param did path string true "DID Doc Id" Did(did:cheqd:mainnet:zF7rhDBfUt9d1gJPjx7s1JXfUY7oVWkY) // @Success 200 {object} types.DidResolution // @Failure 400 {object} types.DidResolution // @Failure 404 {object} types.DidResolution @@ -116,9 +116,9 @@ func (dds DIDDocService) Resolve(did string, contentType types.ContentType) (*ty // @Tags Dereferencing // @Accept application/did+ld+json,application/ld+json,application/did+json // @Produce application/did+ld+json,application/ld+json,application/did+json -// @Param did path string true "DID Doc Id" example(did:cheqd:mainnet:zF7rhDBfUt9d1gJPjx7s1JXfUY7oVWkY) -// @Param fragmentId path string false "`#` + DID Doc Verification Method or Service identifier" example(#key1) -// @Param service query string false "Service id" example("service1") +// @Param did path string true "DID Doc Id" Did(did:cheqd:mainnet:zF7rhDBfUt9d1gJPjx7s1JXfUY7oVWkY) +// @Param fragmentId path string true "`#` + DID Doc Verification Method or Service identifier" FragmentId(#key1) +// @Param service query string false "Service id" ServiceId("service1") // @Success 200 {object} types.DidDereferencing // @Failure 400 {object} types.DidDereferencing // @Failure 404 {object} types.DidDereferencing diff --git a/services/request_service.go b/services/request_service.go index c7b919b9..5ccf6313 100644 --- a/services/request_service.go +++ b/services/request_service.go @@ -56,8 +56,8 @@ func (rs RequestService) ResolveDIDDoc(c echo.Context) error { // @Description Get resource metadata without value by DID Doc // @Tags Dereferencing // @Produce */* -// @Param did path string true "Resource collection id. DID Doc Id" example(did:cheqd:testnet:MjYxNzYKMjYxNzYK) -// @Param resourceId path string true "DID Resource identifier" example(60ad67be-b65b-40b8-b2f4-3923141ef382) +// @Param did path string true "Resource collection id. DID Doc Id" ResourceCollectionId(did:cheqd:testnet:MjYxNzYKMjYxNzYK) +// @Param resourceId path string true "Resource identifier" ResourceId(60ad67be-b65b-40b8-b2f4-3923141ef382) // @Param accept header string false "The requested media type of the DID document representation or DID resolution result. " Enums(application/did+ld+json, application/ld+json, application/did+json) // @Success 200 {object} types.DidDereferencing // @Failure 400 {object} types.DidDereferencing @@ -86,8 +86,8 @@ func (rs RequestService) DereferenceResourceMetadata(c echo.Context) error { // @Description Get resource value without dereferencing wrappers // @Tags Dereferencing // @Produce */* -// @Param did path string true "Resource collection id. DID Doc Id" example(did:cheqd:testnet:MjYxNzYKMjYxNzYK) -// @Param resourceId path string true "DID Resource identifier" example(60ad67be-b65b-40b8-b2f4-3923141ef382) +// @Param did path string true "Resource collection id. DID Doc Id" ResourceCollectionId(did:cheqd:testnet:MjYxNzYKMjYxNzYK) +// @Param resourceId path string true "DID Resource identifier" ResourceId(60ad67be-b65b-40b8-b2f4-3923141ef382) // @Param accept header string false "The requested media type of the DID document representation or DID resolution result. " Enums(application/did+ld+json, application/ld+json, application/did+json) // @Success 200 {object} []byte // @Failure 400 {object} types.DidDereferencing @@ -116,8 +116,8 @@ func (rs RequestService) DereferenceResourceData(c echo.Context) error { // @Description Get a list of all collection resources metadata // @Tags Dereferencing // @Produce */* -// @Param did path string true "Resource collection id. DID Doc Id" example(did:cheqd:testnet:MjYxNzYKMjYxNzYK) -// @Param accept header string false "The requested media type of the DID document representation or DID resolution result. " Enums(application/did+ld+json, application/ld+json, application/did+json) +// @Param did path string true "Resource collection id. DID Doc Id" ResourceCollectionId(did:cheqd:testnet:MjYxNzYKMjYxNzYK) +// @Param accept header string false "The requested media type of the DID document representation or DID resolution result. " ResourceId(application/did+ld+json, application/ld+json, application/did+json) // @Success 200 {object} types.DidDereferencing // @Failure 400 {object} types.DidDereferencing // @Failure 404 {object} types.DidDereferencing