1
0

migrate hs-api to test-api

This commit is contained in:
Michael Hoennig
2022-08-31 15:44:06 +02:00
parent a117258085
commit 8731f4a7b2
17 changed files with 99 additions and 100 deletions

View File

@ -30,14 +30,14 @@ paths:
# HS
/api/customers:
$ref: "./api-definition/hs-customers.yaml"
/api/test-customers:
$ref: "./api-definition/test-customers.yaml"
/api/packages:
$ref: "./api-definition/hs-packages.yaml"
/api/test-packages:
$ref: "./api-definition/test-packages.yaml"
/api/packages/{packageUUID}:
$ref: "./api-definition/hs-packages-uuid.yaml"
/api/test-packages/{packageUUID}:
$ref: "./api-definition/test-packages-uuid.yaml"
# Other

View File

@ -3,7 +3,7 @@ components:
schemas:
Customer:
TestCustomer:
type: object
properties:
uuid:

View File

@ -2,7 +2,7 @@ get:
summary: Returns a list of (optionally filtered) customers.
description: Returns the list of (optionally filtered) customers which are visible to the current user or any of it's assumed roles.
tags:
- customers
- testCustomers
operationId: listCustomers
parameters:
- $ref: './api-definition/auth.yaml#/components/parameters/currentUser'
@ -21,7 +21,7 @@ get:
schema:
type: array
items:
$ref: './api-definition/hs-customer-schemas.yaml#/components/schemas/Customer'
$ref: './api-definition/test-customer-schemas.yaml#/components/schemas/TestCustomer'
"401":
$ref: './api-definition/error-responses.yaml#/components/responses/Unauthorized'
"403":
@ -30,7 +30,7 @@ get:
post:
summary: Adds a new customer.
tags:
- customers
- testCustomers
operationId: addCustomer
parameters:
- $ref: './api-definition/auth.yaml#/components/parameters/currentUser'
@ -39,7 +39,7 @@ post:
content:
'application/json':
schema:
$ref: './api-definition/api-definition/hs-customer-schemas.yaml#/components/schemas/Customer'
$ref: './api-definition/api-definition/test-customer-schemas.yaml#/components/schemas/TestCustomer'
required: true
responses:
"201":
@ -47,7 +47,7 @@ post:
content:
'application/json':
schema:
$ref: './api-definition/hs-customer-schemas.yaml#/components/schemas/Customer'
$ref: './api-definition/test-customer-schemas.yaml#/components/schemas/TestCustomer'
"401":
$ref: './api-definition/error-responses.yaml#/components/responses/Unauthorized'
"403":

View File

@ -3,20 +3,20 @@ components:
schemas:
Package:
TestPackage:
type: object
properties:
uuid:
type: string
format: uuid
customer:
$ref: './api-definition/hs-customer-schemas.yaml#/components/schemas/Customer'
$ref: './api-definition/test-customer-schemas.yaml#/components/schemas/TestCustomer'
name:
type: string
description:
type: string
maxLength: 80
PackageUpdate:
TestPackageUpdate:
type: object
properties:
description:

View File

@ -1,6 +1,6 @@
patch:
tags:
- packages
- testPackages
operationId: updatePackage
parameters:
- $ref: './api-definition/auth.yaml#/components/parameters/currentUser'
@ -15,14 +15,14 @@ patch:
content:
'application/json':
schema:
$ref: './api-definition/hs-package-schemas.yaml#/components/schemas/PackageUpdate'
$ref: './api-definition/test-package-schemas.yaml#/components/schemas/TestPackageUpdate'
responses:
"200":
description: OK
content:
'application/json':
schema:
$ref: './api-definition/hs-package-schemas.yaml#/components/schemas/Package'
$ref: './api-definition/test-package-schemas.yaml#/components/schemas/TestPackage'
"401":
$ref: './api-definition/error-responses.yaml#/components/responses/Unauthorized'
"403":

View File

@ -1,6 +1,6 @@
get:
tags:
- packages
- testPackages
operationId: listPackages
parameters:
- $ref: './api-definition/auth.yaml#/components/parameters/currentUser'
@ -18,7 +18,7 @@ get:
schema:
type: array
items:
$ref: './api-definition/hs-package-schemas.yaml#/components/schemas/Package'
$ref: './api-definition/test-package-schemas.yaml#/components/schemas/TestPackage'
"401":
$ref: './api-definition/error-responses.yaml#/components/responses/Unauthorized'
"403":

View File

@ -7,11 +7,10 @@ options:
map:
result: org.springframework.http.ResponseEntity
types:
- type: array => java.util.List
- type: string:uuid => java.util.UUID
paths:
/api/packages/{packageUUID}:
/api/test-packages/{packageUUID}:
null: org.openapitools.jackson.nullable.JsonNullable