Skip to content

Commit

Permalink
feat: Remove dereferenceSecondary Swagger Endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
DaevMithran committed Dec 5, 2022
1 parent ce35f07 commit b83272e
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 211 deletions.
73 changes: 0 additions & 73 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,79 +286,6 @@ const docTemplate = `{
}
}
}
},
"/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 Doc Id",
"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": {
Expand Down
73 changes: 0 additions & 73 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -277,79 +277,6 @@
}
}
}
},
"/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 Doc Id",
"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": {
Expand Down
50 changes: 0 additions & 50 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -371,54 +371,4 @@ paths:
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 Doc Id
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"
15 changes: 0 additions & 15 deletions services/diddoc_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,21 +110,6 @@ func (dds DIDDocService) Resolve(did string, contentType types.ContentType) (*ty
return &result, nil
}

// ResolveDIDDocDereferencing godoc
// @Summary Resolve or dereferencing DID Doc
// @Description Get DID Doc or its fragment
// @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" 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
// @Failure 406 {object} types.DidDereferencing
// @Failure 500 {object} types.DidDereferencing
// @Router /1.0/identifiers/{did}{fragmentId} [get]
func (dds DIDDocService) dereferenceSecondary(did string, fragmentId string, contentType types.ContentType) (*types.DidDereferencing, *types.IdentityError) {
didResolution, err := dds.Resolve(did, contentType)
if err != nil {
Expand Down

0 comments on commit b83272e

Please sign in to comment.