You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By taking the GET /Payments/{PaymentID} endpoint definition, every field of the "Payment" schema is marked as optional : there is no required fields.
However, by looking at the developer documentation it seems that some fields are optional (Reference for example) but some seems required (like the Date field).
I can see that you reuse the Payment schema for creation request and read request. It's a good thing, however, for response, you can define your response schema by reusing your existing schema and add required property. Example below
PaymentResponse:
allOf:
- $ref: '#/components/schemas/Payment'required:
- Date
Could you fix the OpenAPI definition to mark fields always present as required please ?
Otherwise, could you provide some explanation about when the Date field can be undefined ?
Thanks
The text was updated successfully, but these errors were encountered:
Hello
There seems to have big inconsistencies on your OpenAPI definition.
I work with this file : https://github.com/XeroAPI/Xero-OpenAPI/blob/master/xero_accounting.yaml
By taking the
GET /Payments/{PaymentID}
endpoint definition, every field of the "Payment" schema is marked as optional : there is norequired
fields.However, by looking at the developer documentation it seems that some fields are optional (
Reference
for example) but some seems required (like theDate
field).I can see that you reuse the
Payment
schema for creation request and read request. It's a good thing, however, for response, you can define your response schema by reusing your existing schema and add required property. Example belowCould you fix the OpenAPI definition to mark fields always present as required please ?
Otherwise, could you provide some explanation about when the Date field can be undefined ?
Thanks
The text was updated successfully, but these errors were encountered: