Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core types are exported as generic objects #132

Open
nissimsan opened this issue May 29, 2020 · 0 comments
Open

Core types are exported as generic objects #132

nissimsan opened this issue May 29, 2020 · 0 comments
Assignees

Comments

@nissimsan
Copy link

The Core types are exported as generic objects

For example, here are two attributes referring to two such Core types (Text and Numeric):

        serviceMode:
          description: 'The scope of the consignment, such as CY-CY or SD-SD.'
          allOf:
            - $ref: '#/components/schemas/Text'
            - type: object
        transportEquipmentQuantity:
          description: >-
            A number of pieces of transport equipment, such as containers or
            similar unit load devices, in this consignment.
          allOf:
            - $ref: '#/components/schemas/Numeric'
            - type: object
...
    Text:
      description: ''
      type: object
      properties: {}
    Numeric:
      description: ''
      type: object
      properties: {}

Nowhere is it actually specified that these are string and number types. In fact, they are specified as objects twice - both in the attribute and in the referred type.

A functioning export of the above example would be:

        serviceMode:
          description: 'The scope of the consignment, such as CY-CY or SD-SD.'
          allOf:
            - $ref: '#/components/schemas/Text'
        transportEquipmentQuantity:
          description: >-
            A number of pieces of transport equipment, such as containers or
            similar unit load devices, in this consignment.
          allOf:
            - $ref: '#/components/schemas/Numeric'
...
    Text:
      description: ''
      type: string
    Numeric:
      description: ''
      type: string
@kshychko kshychko self-assigned this Jun 4, 2020
kshychko added a commit that referenced this issue Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants