forked from krylataya/ausdigital-dcl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add api in yaml format #ausdigital-dcp/12
- Loading branch information
Showing
1 changed file
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
swagger: '2.0' | ||
info: | ||
version: "1.0" | ||
title: Digital Capability Locator (DCL) interface specification | ||
description: | | ||
The "Digital Capability Lookup" (DCL) specification defines a DNS based method to discover which DCP(SMP) is the authoritative source for a given business | ||
|
||
API uses JWT authorization, JWT issuer must be added to whitelist on DCL implementation. It's passed as a header `Authorization: JWT XXX`, where XXX value provided by your IDP. | ||
|
||
host: "dcp.testpoint.io" | ||
schemes: | ||
- "https" | ||
# will be prefixed to all paths | ||
basePath: "/api/v0" | ||
produces: | ||
- "application/json" | ||
parameters: | ||
participantIdUrlParameter: | ||
name: participant_id | ||
in: path | ||
description: string representation | ||
required: true | ||
type: string | ||
default: "urn:oasis:names:tc:ebcore:partyid-type:iso6523:0151::22341388307" | ||
paths: | ||
/demo_auth/: | ||
get: | ||
tags: | ||
- "auth" | ||
summary: "Get base user information with authentication enabled" | ||
description: "Check if OIDC JWT token is correct" | ||
operationId: "DemoAuth" | ||
responses: | ||
"200": | ||
description: "The JWT is correct" | ||
"401": | ||
description: "Wrong auth parameters" | ||
|
||
/dcl/{participant_id}: | ||
put: | ||
tags: | ||
- "DCL" | ||
summary: Update DCP value | ||
description: Updates DNS NAPTR record with new DCP value for given business/participant | ||
operationId: DclPut | ||
parameters: | ||
- $ref: "#/parameters/participantIdUrlParameter" | ||
- description: New DCP info | ||
in: body | ||
name: body | ||
required: true | ||
schema: | ||
properties: | ||
dcp: | ||
description: "new DCP hostname (for example, dcp.testpoint.io)" | ||
type: "string" | ||
format: string | ||
responses: | ||
"200": | ||
description: Success | ||
"401": | ||
description: Wrong Auth Header | ||
"404": | ||
description: Participant Not found | ||
"500": | ||
description: Internal server error |