diff --git a/openapi/components/schemas/ProductListing.yaml b/openapi/components/schemas/ProductListing.yaml index a42c6679..197d49d0 100644 --- a/openapi/components/schemas/ProductListing.yaml +++ b/openapi/components/schemas/ProductListing.yaml @@ -58,8 +58,15 @@ properties: products: type: array items: - type: object description: Either a ProductID or a Product, depending on hydration + x-if: + when: jsonschema + then: + oneOf: + - $ref: ./Product.yaml + - $ref: ./ProductID.yaml + else: + type: object quantifiable: type: boolean recurrable: diff --git a/openapi/components/schemas/Transaction.yaml b/openapi/components/schemas/Transaction.yaml index cc14489a..d0cb56be 100644 --- a/openapi/components/schemas/Transaction.yaml +++ b/openapi/components/schemas/Transaction.yaml @@ -3,7 +3,14 @@ type: object description: "" properties: agreement: - $ref: ./TransactionAgreement.yaml + x-if: + when: jsonschema + then: + oneOf: + - $ref: ./TransactionAgreement.yaml + - type: string + else: + $ref: ./TransactionAgreement.yaml created_at: type: string format: date-time