From 422cc9892faa87b94f6bc3a743fd9404fbe44b41 Mon Sep 17 00:00:00 2001 From: MelKori Date: Sat, 6 Nov 2021 13:50:48 +0200 Subject: [PATCH 1/2] prepare OpenAPI description skeleton --- openapi/swagger.yml | 108 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 openapi/swagger.yml diff --git a/openapi/swagger.yml b/openapi/swagger.yml new file mode 100644 index 0000000..790bf9f --- /dev/null +++ b/openapi/swagger.yml @@ -0,0 +1,108 @@ +openapi: 3.0.3 + +servers: + - url: https://sandbox-api.tbt-post.net/api/v1 + +info: + description: >- + This document roughly describes TBT Cloud public API. + version: 1.4.1 + title: TBT Cloud API + license: + name: Apache-2.0 + url: 'https://www.apache.org/licenses/LICENSE-2.0.html' + +externalDocs: + description: Find out more about TBT Cloud + url: 'https://tbt-post.net' + +tags: + - name: Common + description: Common API part + + - name: WMS + description: WMS SaaS specific part + + - name: BMS + description: BMS SaaS specific part + + - name: FMS + description: FMS AaaS specific part + +paths: + + /: + get: + tags: + - Common + summary: Get API info + description: Retrieve basic API information + operationId: info + responses: + "200": + description: Returns API info + content: + application/json: + schema: + allOf: + - $ref: "#/components/schemas/SimpleResponse" + - type: object + required: + - profile + - version + - build + - api_version + properties: + profile: + type: string + enum: + - dev + - staging + - next + - prod + example: "dev" + version: + type: string + example: "1.4.1" + build: + type: string + example: "devel:74fa5021" + api_version: + type: string + description: Current API version level for /api/v{level} + default: "1" + example: "1" + security: [] # No security + +components: + requestBodies: + EmptyBody: + content: + application/json: + schema: + type: object + additionalProperties: false + description: Empty JSON body + required: true + + schemas: + SimpleResponse: + type: object + required: + - success + properties: + success: + description: operation result + type: boolean + example: true + message: + description: error message if success = false + type: string + nullable: true + required: false + trace: + description: error trace if any + type: string + nullable: true + required: false + additionalProperties: false From f2d898ede99f02ec3bd35428511f9189b3e82e48 Mon Sep 17 00:00:00 2001 From: Oleg Noga Date: Wed, 29 Dec 2021 19:24:21 +0200 Subject: [PATCH 2/2] group added to event_parcel OrderReturn --- edi/json-schema/event_parcel.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/edi/json-schema/event_parcel.json b/edi/json-schema/event_parcel.json index 50cc5cd..c300a52 100644 --- a/edi/json-schema/event_parcel.json +++ b/edi/json-schema/event_parcel.json @@ -92,6 +92,10 @@ "msg_for": { "$ref": "#/definitions/uuid", "description": "User id to proxy message for" + }, + "group": { + "$ref": "#/definitions/uuid", + "description": "Agent group" } } },