diff --git a/openapi/api-docs.yaml b/openapi/api-docs.yaml index a904cef64414..cb4ba204d6d6 100644 --- a/openapi/api-docs.yaml +++ b/openapi/api-docs.yaml @@ -152,6 +152,8 @@ paths: $ref: "#/components/responses/403" 422: $ref: "#/components/responses/422" + 5XX: + $ref: "#/components/responses/5XX" default: $ref: "#/components/responses/default" /api/v1/refresh: @@ -13479,6 +13481,12 @@ components: application/json: schema: $ref: '#components/schemas/AuthenticationError' + 400: + description: 'Invalid user input' + content: + application/json: + schema: + $ref: '#components/schemas/InvalidInputError' 429: description: 'Rate Limit Exceeded' @@ -14002,8 +14010,34 @@ components: type: string type: object type: object - - + RateLimiterError: + properties: + message: + description: 'Rate limit exceeded.' + type: string + example: 'Rate limit exceeded.' + errors: + properties: + value: + type: array + items: + type: string + type: object + type: object + InvalidInputError: + properties: + message: + description: 'Invalid input' + type: string + example: 'Invalid input' + errors: + properties: + value: + type: array + items: + type: string + type: object + type: object Webhook: properties: id: @@ -14351,6 +14385,10 @@ components: type: string example: Opnel5aKBz readOnly: true + contacts: + type: array + items: + $ref: '#/components/schemas/ClientContact' user_id: description: 'The unique identifier of the user who created the client' type: string @@ -14365,10 +14403,6 @@ components: type: string example: Co7Vn3yLmW readOnly: true - contacts: - type: array - items: - $ref: '#/components/schemas/ClientContact' name: description: 'The name of the client company or organization' type: string @@ -14516,8 +14550,6 @@ components: format: integer example: '1628445631' readOnly: true - settings: - $ref: '#/components/schemas/ClientSettings' group_settings_id: description: 'The group settings assigned to the client' type: string @@ -14540,6 +14572,8 @@ components: type: number example: 100 readOnly: true + settings: + $ref: '#/components/schemas/ClientSettings' type: object SystemLog: properties: @@ -15794,7 +15828,13 @@ components: example: '2' type: object CompanySettings: + required: + - currency_id properties: + currency_id: + description: 'The default currency id' + type: string + example: true timezone_id: description: 'The timezone id' type: string @@ -15815,10 +15855,6 @@ components: description: 'Toggles whether the currency symbol or code is shown' type: boolean example: true - currency_id: - description: 'The default currency id' - type: string - example: true payment_terms: description: '-1 sets no payment term, 0 sets payment due immediately, positive integers indicates payment terms in days' type: integer @@ -17177,8 +17213,6 @@ components: type: boolean example: false readOnly: true - settings: - $ref: '#/components/schemas/ClientSettings' group_settings_id: description: 'The group settings assigned to the client' type: string @@ -17196,6 +17230,8 @@ components: type: boolean example: false readOnly: true + settings: + $ref: '#/components/schemas/ClientSettings' type: object Project: type: object @@ -17525,7 +17561,13 @@ components: example: '134341234234' type: object ClientSettings: + required: + - currency_id properties: + currency_id: + description: 'The default currency id' + type: string + example: true timezone_id: description: 'The timezone id' type: string @@ -17546,10 +17588,6 @@ components: description: 'Toggles whether the currency symbol or code is shown' type: boolean example: true - currency_id: - description: 'The default currency id' - type: string - example: true payment_terms: description: '-1 sets no payment term, 0 sets payment due immediately, positive integers indicates payment terms in days' type: integer diff --git a/openapi/components/responses/400.yaml b/openapi/components/responses/400.yaml new file mode 100644 index 000000000000..3b0c36da2581 --- /dev/null +++ b/openapi/components/responses/400.yaml @@ -0,0 +1,6 @@ + 400: + description: 'Invalid user input' + content: + application/json: + schema: + $ref: '#components/schemas/InvalidInputError' \ No newline at end of file diff --git a/openapi/components/schemas.yaml b/openapi/components/schemas.yaml index 3a579727752c..ae5e8b4c14c3 100644 --- a/openapi/components/schemas.yaml +++ b/openapi/components/schemas.yaml @@ -247,8 +247,34 @@ type: string type: object type: object - - + RateLimiterError: + properties: + message: + description: 'Rate limit exceeded.' + type: string + example: 'Rate limit exceeded.' + errors: + properties: + value: + type: array + items: + type: string + type: object + type: object + InvalidInputError: + properties: + message: + description: 'Invalid input' + type: string + example: 'Invalid input' + errors: + properties: + value: + type: array + items: + type: string + type: object + type: object Webhook: properties: id: diff --git a/openapi/components/schemas/client.yaml b/openapi/components/schemas/client.yaml index 48706326545f..d242122173b5 100644 --- a/openapi/components/schemas/client.yaml +++ b/openapi/components/schemas/client.yaml @@ -5,6 +5,10 @@ type: string example: Opnel5aKBz readOnly: true + contacts: + type: array + items: + $ref: '#/components/schemas/ClientContact' user_id: description: 'The unique identifier of the user who created the client' type: string @@ -19,10 +23,6 @@ type: string example: Co7Vn3yLmW readOnly: true - contacts: - type: array - items: - $ref: '#/components/schemas/ClientContact' name: description: 'The name of the client company or organization' type: string @@ -170,8 +170,6 @@ format: integer example: '1628445631' readOnly: true - settings: - $ref: '#/components/schemas/ClientSettings' group_settings_id: description: 'The group settings assigned to the client' type: string @@ -194,4 +192,6 @@ type: number example: 100 readOnly: true + settings: + $ref: '#/components/schemas/ClientSettings' type: object \ No newline at end of file diff --git a/openapi/components/schemas/client_request.yaml b/openapi/components/schemas/client_request.yaml index 552282aebf4a..fe867aec84a8 100644 --- a/openapi/components/schemas/client_request.yaml +++ b/openapi/components/schemas/client_request.yaml @@ -119,8 +119,6 @@ type: boolean example: false readOnly: true - settings: - $ref: '#/components/schemas/ClientSettings' group_settings_id: description: 'The group settings assigned to the client' type: string @@ -138,4 +136,6 @@ type: boolean example: false readOnly: true + settings: + $ref: '#/components/schemas/ClientSettings' type: object \ No newline at end of file diff --git a/openapi/components/schemas/client_settings.yaml b/openapi/components/schemas/client_settings.yaml index 84dac4329d9f..c24dbb5ed1c4 100644 --- a/openapi/components/schemas/client_settings.yaml +++ b/openapi/components/schemas/client_settings.yaml @@ -1,5 +1,11 @@ ClientSettings: + required: + - currency_id properties: + currency_id: + description: 'The default currency id' + type: string + example: true timezone_id: description: 'The timezone id' type: string @@ -20,10 +26,6 @@ description: 'Toggles whether the currency symbol or code is shown' type: boolean example: true - currency_id: - description: 'The default currency id' - type: string - example: true payment_terms: description: '-1 sets no payment term, 0 sets payment due immediately, positive integers indicates payment terms in days' type: integer diff --git a/openapi/components/schemas/company_settings.yaml b/openapi/components/schemas/company_settings.yaml index 7c3baf0db42b..5b671e5a4de5 100644 --- a/openapi/components/schemas/company_settings.yaml +++ b/openapi/components/schemas/company_settings.yaml @@ -1,5 +1,11 @@ CompanySettings: + required: + - currency_id properties: + currency_id: + description: 'The default currency id' + type: string + example: true timezone_id: description: 'The timezone id' type: string @@ -20,10 +26,6 @@ description: 'Toggles whether the currency symbol or code is shown' type: boolean example: true - currency_id: - description: 'The default currency id' - type: string - example: true payment_terms: description: '-1 sets no payment term, 0 sets payment due immediately, positive integers indicates payment terms in days' type: integer diff --git a/openapi/paths.yaml b/openapi/paths.yaml index e4ec6e8af5e5..f33e29e006a1 100644 --- a/openapi/paths.yaml +++ b/openapi/paths.yaml @@ -128,6 +128,8 @@ paths: $ref: "#/components/responses/403" 422: $ref: "#/components/responses/422" + 5XX: + $ref: "#/components/responses/5XX" default: $ref: "#/components/responses/default" /api/v1/refresh: