diff options
author | 2020-03-27 12:00:50 +0100 | |
---|---|---|
committer | 2020-03-27 12:00:50 +0100 | |
commit | bb60b59dd57cadcb66dd89ffb89505204a0a7b96 (patch) | |
tree | 713dc95bbf117763d667ab659bd6372dad7ea3e5 /docs | |
parent | 34c9d73b6f2fa86a51cf0f1b774ff3128e66a016 (diff) |
Update swagger documentation
Issue-ID: AAF-1107
Signed-off-by: Zebek Bogumil <bogumil.zebek@nokia.com>
Change-Id: I9b95bdb2b854deb1a43b6f85b34c859c973cedae
Diffstat (limited to 'docs')
-rw-r--r-- | docs/sections/offeredapis.rst | 162 | ||||
-rw-r--r-- | docs/sections/resources/OpenAPI.yaml | 158 |
2 files changed, 161 insertions, 159 deletions
diff --git a/docs/sections/offeredapis.rst b/docs/sections/offeredapis.rst index 31e53bc5..8d84b638 100644 --- a/docs/sections/offeredapis.rst +++ b/docs/sections/offeredapis.rst @@ -8,4 +8,164 @@ Offered APIs AAF Cert Service Api -------------------- -.. openapi:: resources/OpenAPI.yaml +.. code-block:: yaml + + openapi: 3.0.1 + info: + title: CertService Documentation + description: Certification service API documentation + version: 1.0.0 + servers: + - url: http://localhost:8080 + description: Generated server url + tags: + - name: Actuator + description: Monitor and interact + externalDocs: + description: Spring Boot Actuator Web API Documentation + url: https://docs.spring.io/spring-boot/docs/current/actuator-api/html/ + paths: + /v1/certificate/{caName}: + get: + tags: + - CertificationService + summary: sign certificate + description: Web endpoint for requesting certificate signing. Used by system + components to gain certificate signed by CA. + operationId: signCertificate + parameters: + - name: caName + in: path + description: Name of certification authority that will sign CSR. + required: true + schema: + type: string + - name: CSR + in: header + description: Certificate signing request in form of PEM object encoded in + Base64 (with header and footer). + required: true + schema: + type: string + - name: PK + in: header + description: Private key in form of PEM object encoded in Base64 (with header + and footer). + required: true + schema: + type: string + responses: + "200": + description: certificate successfully signed + content: + application/json; charset=utf-8: + schema: + $ref: '#/components/schemas/CertificationModel' + "500": + description: something went wrong during connecting to cmp client + content: + application/json; charset=utf-8: + schema: + $ref: '#/components/schemas/ErrorResponseModel' + "404": + description: CA not found for given name + content: + application/json; charset=utf-8: + schema: + $ref: '#/components/schemas/ErrorResponseModel' + "400": + description: given CSR or/and PK is incorrect + content: + application/json; charset=utf-8: + schema: + $ref: '#/components/schemas/ErrorResponseModel' + /ready: + get: + tags: + - CertificationService + summary: check is container is ready + description: Web endpoint for checking if service is ready to be used. + operationId: checkReady + responses: + "200": + description: configuration is loaded and service is ready to use + content: + application/json; charset=utf-8: + schema: + type: string + "503": + description: configuration loading failed and service is unavailable + content: + application/json; charset=utf-8: + schema: + type: string + /reload: + get: + tags: + - CertificationService + summary: reload service configuration from file + description: Web endpoint for performing configuration reload. Used to reload + configuration file from file. + operationId: reloadConfiguration + responses: + "200": + description: configuration has been successfully reloaded + content: + application/json; charset=utf-8: + schema: + type: string + "500": + description: something went wrong during configuration loading + content: + application/json; charset=utf-8: + schema: + $ref: '#/components/schemas/ErrorResponseModel' + /actuator/health: + get: + tags: + - Actuator + summary: Actuator web endpoint 'health' + operationId: handle_0 + responses: + "200": + description: default response + content: {} + /actuator/health/**: + get: + tags: + - Actuator + summary: Actuator web endpoint 'health-path' + operationId: handle_1 + responses: + "200": + description: default response + content: {} + /actuator: + get: + tags: + - Actuator + summary: Actuator root web endpoint + operationId: links_2 + responses: + "200": + description: default response + content: {} + components: + schemas: + ErrorResponseModel: + type: object + properties: + errorMessage: + type: string + CertificationModel: + type: object + properties: + certificateChain: + type: array + items: + type: string + trustedCertificates: + type: array + items: + type: string + diff --git a/docs/sections/resources/OpenAPI.yaml b/docs/sections/resources/OpenAPI.yaml deleted file mode 100644 index cee5a402..00000000 --- a/docs/sections/resources/OpenAPI.yaml +++ /dev/null @@ -1,158 +0,0 @@ -openapi: 3.0.1 -info: - title: CertService Documentation - description: Certification service API documentation - version: 1.0.0 -servers: - - url: http://localhost:8080 - description: Generated server url -tags: - - name: Actuator - description: Monitor and interact - externalDocs: - description: Spring Boot Actuator Web API Documentation - url: https://docs.spring.io/spring-boot/docs/current/actuator-api/html/ -paths: - /v1/certificate/{caName}: - get: - tags: - - CertificationService - summary: sign certificate - description: Web endpoint for requesting certificate signing. Used by system - components to gain certificate signed by CA. - operationId: signCertificate - parameters: - - name: caName - in: path - description: Name of certification authority that will sign CSR. - required: true - schema: - type: string - - name: CSR - in: header - description: Certificate signing request in form of PEM object encoded in - Base64 (with header and footer). - required: true - schema: - type: string - - name: PK - in: header - description: Private key in form of PEM object encoded in Base64 (with header - and footer). - required: true - schema: - type: string - responses: - "200": - description: certificate successfully signed - content: - application/json; charset=utf-8: - schema: - $ref: '#/components/schemas/CertificationModel' - "500": - description: something went wrong during connecting to cmp client - content: - application/json; charset=utf-8: - schema: - $ref: '#/components/schemas/ErrorResponseModel' - "404": - description: CA not found for given name - content: - application/json; charset=utf-8: - schema: - $ref: '#/components/schemas/ErrorResponseModel' - "400": - description: given CSR or/and PK is incorrect - content: - application/json; charset=utf-8: - schema: - $ref: '#/components/schemas/ErrorResponseModel' - /ready: - get: - tags: - - CertificationService - summary: check is container is ready - description: Web endpoint for checking if service is ready to be used. - operationId: checkReady - responses: - "200": - description: configuration is loaded and service is ready to use - content: - application/json; charset=utf-8: - schema: - type: string - "503": - description: configuration loading failed and service is unavailable - content: - application/json; charset=utf-8: - schema: - type: string - /reload: - get: - tags: - - CertificationService - summary: reload service configuration from file - description: Web endpoint for performing configuration reload. Used to reload - configuration file from file. - operationId: reloadConfiguration - responses: - "200": - description: configuration has been successfully reloaded - content: - application/json; charset=utf-8: - schema: - type: string - "500": - description: something went wrong during configuration loading - content: - application/json; charset=utf-8: - schema: - $ref: '#/components/schemas/ErrorResponseModel' - /actuator/health: - get: - tags: - - Actuator - summary: Actuator web endpoint 'health' - operationId: handle_0 - responses: - "200": - description: default response - content: {} - /actuator/health/**: - get: - tags: - - Actuator - summary: Actuator web endpoint 'health-path' - operationId: handle_1 - responses: - "200": - description: default response - content: {} - /actuator: - get: - tags: - - Actuator - summary: Actuator root web endpoint - operationId: links_2 - responses: - "200": - description: default response - content: {} -components: - schemas: - ErrorResponseModel: - type: object - properties: - errorMessage: - type: string - CertificationModel: - type: object - properties: - certificateChain: - type: array - items: - type: string - trustedCertificates: - type: array - items: - type: string |