-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Open API doc added under docs/api directory
- Loading branch information
1 parent
8963bd2
commit dd43de8
Showing
2 changed files
with
161 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
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,158 @@ | ||
################################################################################# | ||
# Copyright (c) 2024 T-Systems International GmbH | ||
# Copyright (c) 2024 Contributors to the Eclipse Foundation | ||
# | ||
# See the NOTICE file(s) distributed with this work for additional | ||
# information regarding copyright ownership. | ||
# | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Apache License, Version 2.0 which is available at | ||
# https://www.apache.org/licenses/LICENSE-2.0. | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
# License for the specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
################################################################################ | ||
|
||
openapi: 3.0.0 | ||
info: | ||
version: Release3 | ||
title: SD-Factory API | ||
description: API for creating and storing the Verifiable Credentials | ||
paths: | ||
/api/rel3/selfdescription: | ||
post: | ||
summary: Creates a Verifiable Credential and returns it | ||
operationId: selfdescriptionPost | ||
requestBody: | ||
required: true | ||
description: parameters to generate VC | ||
content: | ||
application/json: | ||
schema: | ||
oneOf: | ||
- $ref: '#/components/schemas/LegalParticipantSchema' | ||
- $ref: '#/components/schemas/ServiceOfferingSchema' | ||
discriminator: | ||
propertyName: type | ||
mapping: | ||
LegalParticipant: '#/components/schemas/LegalParticipantSchema' | ||
ServiceOffering: '#/components/schemas/ServiceOfferingSchema' | ||
examples: | ||
LegalParticipant: | ||
description: payload to create LegalParticipant | ||
value: | ||
externalId: ID01234-123-4321 | ||
type: LegalParticipant | ||
holder: BPNL000000000000 | ||
issuer: CAXSDUMMYCATENAZZ | ||
registrationNumber: | ||
- type: taxID | ||
value: o12345678 | ||
headquarterAddress.country: DE | ||
legalAddress.country: DE | ||
bpn: BPNL000000000000 | ||
ServiceOffering: | ||
description: payload to create ServiceOffering | ||
value: | ||
externalId: ID01234-123-4321 | ||
type: ServiceOffering | ||
holder: BPNL000000000000 | ||
issuer: CAXSDUMMYCATENAZZ | ||
providedBy: https://participant.url | ||
aggregationOf: https://aggr1.url, https://aggr2.url | ||
termsAndConditions: https://raw.githubusercontent.com/eclipse-tractusx/sd-factory/main/LICENSE | ||
policies: policy1, policy2 | ||
responses: | ||
'202': | ||
description: request has been accepted for processing | ||
components: | ||
securitySchemes: | ||
bearerAuth: # arbitrary name for the security scheme | ||
type: http | ||
scheme: bearer | ||
bearerFormat: JWT # optional, arbitrary value for documentation purposes | ||
schemas: | ||
SelfDescriptionSchema: | ||
type: object | ||
properties: | ||
type: | ||
type: string | ||
holder: | ||
type: string | ||
issuer: | ||
type: string | ||
externalId: | ||
type: string | ||
required: | ||
- type | ||
- holder | ||
- issuer | ||
- externalId | ||
RegistrationNumberSchema: | ||
type: object | ||
description: Registration Number element | ||
properties: | ||
type: | ||
type: string | ||
description: the mean to request data retrieval | ||
enum: | ||
- taxID | ||
- local | ||
- vatID | ||
- EUID | ||
- EORI | ||
- leiCode | ||
value: | ||
type: string | ||
description: Registration Number value | ||
minLength: 1 | ||
maxLength: 128 | ||
LegalParticipantSchema: | ||
type: object | ||
allOf: | ||
- $ref: '#/components/schemas/SelfDescriptionSchema' | ||
- type: object | ||
properties: | ||
registrationNumber: | ||
type: array | ||
uniqueItems: true | ||
minItems: 1 | ||
maxItems: 512 | ||
description: A list of registration numbers | ||
items: | ||
$ref: '#/components/schemas/RegistrationNumberSchema' | ||
headquarterAddress.country: | ||
type: string | ||
legalAddress.country: | ||
type: string | ||
bpn: | ||
type: string | ||
required: | ||
- registrationNumber | ||
- headquarterAddress.country | ||
- legalAddress.country | ||
- bpn | ||
ServiceOfferingSchema: | ||
type: object | ||
allOf: | ||
- $ref: '#/components/schemas/SelfDescriptionSchema' | ||
- type: object | ||
properties: | ||
providedBy: | ||
type: string | ||
format: uri | ||
aggregationOf: | ||
type: string | ||
termsAndConditions: | ||
type: string | ||
policies: | ||
type: string | ||
required: | ||
- providedBy | ||
security: | ||
- bearerAuth: [] |