-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(api-hub): create open api spec on build (#66)
Refs: #64 Reviewed-By: Evelyn Gurschler <[email protected]>
- Loading branch information
Showing
14 changed files
with
213 additions
and
58 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
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
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
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,159 @@ | ||
openapi: 3.0.1 | ||
info: | ||
title: Org.Eclipse.TractusX.SsiAuthoritySchemaRegistry.Service | ||
version: v1.0.0 | ||
paths: | ||
/api/registry/credentials: | ||
get: | ||
tags: | ||
- 'Org.Eclipse.TractusX.SsiAuthoritySchemaRegistry.Service, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' | ||
summary: Gets all credentials with optional filter possibilities | ||
description: 'Example: GET: api/registry/credentials' | ||
parameters: | ||
- name: bpnl | ||
in: query | ||
schema: | ||
type: string | ||
- name: credentialTypeId | ||
in: query | ||
schema: | ||
$ref: '#/components/schemas/CredentialTypeId' | ||
responses: | ||
'200': | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/CredentialData' | ||
'401': | ||
description: Unauthorized | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/ErrorResponse' | ||
'500': | ||
description: Internal Server Error | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/ErrorResponse' | ||
/api/schema/validate: | ||
post: | ||
tags: | ||
- 'Org.Eclipse.TractusX.SsiAuthoritySchemaRegistry.Service, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' | ||
summary: Gets all credentials with optional filter possibilities | ||
description: 'Example: POST: api/schema/validate' | ||
parameters: | ||
- name: schemaType | ||
in: query | ||
required: true | ||
schema: | ||
$ref: '#/components/schemas/CredentialSchemaType' | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: { } | ||
required: true | ||
responses: | ||
'200': | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
type: boolean | ||
'401': | ||
description: Unauthorized | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/ErrorResponse' | ||
'500': | ||
description: Internal Server Error | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/ErrorResponse' | ||
components: | ||
schemas: | ||
CredentialData: | ||
type: object | ||
properties: | ||
credentialName: | ||
type: string | ||
credential: | ||
type: string | ||
authorities: | ||
type: array | ||
items: | ||
type: string | ||
additionalProperties: false | ||
CredentialSchemaType: | ||
enum: | ||
- BusinessPartnerCredential | ||
- DismantlerCredential | ||
- FrameworkCredential | ||
- MembershipCredential | ||
type: string | ||
CredentialTypeId: | ||
enum: | ||
- BusinessPartnerNumber | ||
- Membership | ||
- Framework | ||
- CompanyRole | ||
type: string | ||
ErrorDetails: | ||
type: object | ||
properties: | ||
errorCode: | ||
type: string | ||
type: | ||
type: string | ||
message: | ||
type: string | ||
parameters: | ||
Check warning on line 115 in docs/api/asr-service.yaml GitHub Actions / Analyze[MEDIUM] Array Without Maximum Number of Items (v3)
|
||
type: array | ||
items: | ||
$ref: '#/components/schemas/ErrorParameter' | ||
additionalProperties: false | ||
ErrorParameter: | ||
type: object | ||
properties: | ||
name: | ||
type: string | ||
value: | ||
type: string | ||
additionalProperties: false | ||
ErrorResponse: | ||
type: object | ||
properties: | ||
type: | ||
type: string | ||
title: | ||
type: string | ||
status: | ||
type: integer | ||
format: int32 | ||
errors: | ||
type: object | ||
additionalProperties: | ||
type: array | ||
items: | ||
type: string | ||
errorId: | ||
type: string | ||
details: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/ErrorDetails' | ||
nullable: true | ||
additionalProperties: false | ||
securitySchemes: | ||
Bearer: | ||
type: apiKey | ||
description: "JWT Authorization header using the Bearer scheme. \r\n\r\n Enter 'Bearer' [space] and then your token in the text input below.\r\n\r\nExample: \"Bearer 12345abcdef\"" | ||
name: Authorization | ||
in: header | ||
security: | ||
- Bearer: [ ] |
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
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
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
13 changes: 13 additions & 0 deletions
13
src/registry/SsiAuthoritySchemaRegistry.Service/.config/dotnet-tools.json
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,13 @@ | ||
{ | ||
"version": 1, | ||
"isRoot": true, | ||
"tools": { | ||
"swashbuckle.aspnetcore.cli": { | ||
"version": "6.8.0", | ||
"commands": [ | ||
"swagger" | ||
], | ||
"rollForward": false | ||
} | ||
} | ||
} |
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
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
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
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
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
24 changes: 0 additions & 24 deletions
24
tests/registry/SsiAuthoritySchemaRegistry.Service.Tests/appsettings.IntegrationTests.json
This file was deleted.
Oops, something went wrong.