Skip to content

Parsing allOf for XML and JSON #10

@marklewin

Description

@marklewin

If you look at niResponseXmlStandard in '#/components/schemas', you can see that it uses allOf to include the responses to niResponseXmlBasic and then add additional fields:

    niResponseXmlStandard:
      type: object
      description: 'Standard'
      xml:
        name: lookup
      allOf:
        - $ref: '#/components/schemas/niResponseXmlBasic'
        - properties:
            request_price:
              type: number
              description: 'If there is an internal lookup error, the `refund_price` will reflect the lookup price. If `cnam` is requested for a non-US number the `refund_price` will reflect the `cnam` price. If both of these conditions occur, `refund_price` is the sum of the lookup price and `cnam` price.'
              example: '0.01500000'
            remaining_balance:
              type: number
              description: 'Your account balance in EUR after this request. Not returned with Number Insight Advanced Async API.'
              example: '1.23456789'

I’m trying to do the same with niResponseJsonStandard, but it won't render properly (or at all), breaking both XML and JSON versions:

screen shot 2018-10-12 at 13 02 35

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions