swagger-editor icon indicating copy to clipboard operation
swagger-editor copied to clipboard

Schema Viewer should handle implicit type definition

Open mathis-m opened this issue 4 years ago • 0 comments

@tim-lai since the schema viewer does not implement it either we should have a look at this too:

image

we could choose to render the following insead to do it more verbose. With this one can understand why we generate "string" as sample value.

      anyOf:
        - type: string
        - type: number
        - type: integer
        - type: boolean
        - type: array
          items: {}
        - type: object

If this is unwanted because it will sort of render some different then the spec defines we should at least give some hint on it: Can be any value - string, number, boolean, array or object.

Originally posted by @mathis-m in https://github.com/swagger-api/swagger-editor/issues/2416#issuecomment-806155237

mathis-m avatar Mar 27 '21 13:03 mathis-m