SwaggerProvider icon indicating copy to clipboard operation
SwaggerProvider copied to clipboard

Generate primitive types for aliases of primitive types in Swagger

Open xperiandri opened this issue 3 years ago • 0 comments

Description

Aliases to primitive types are not translated to primitive types

Repro steps

components:
  schemas:
    PhoneNumber:
      type: string
    Order:
      type: object
      properties:
        phone:
          $ref: '#/components/schemas/PhoneNumber'
components:
  schemas:
    PhoneNumber:
      type: string
    Order:
      type: object
      properties:
        phone:
          allOf:
            - $ref: '#/components/schemas/PhoneNumber'
          nullable: false

Expected behavior

Phone property is resolved as string

Actual behavior

Both of these are resolved as obj instead of string

Known workarounds

Unknown

Related information

<PackageReference Include="SwaggerProvider" Version="0.10.7" />

xperiandri avatar Oct 25 '20 12:10 xperiandri