I am trying to create a schema which includes key - value arrays, but the properties are themselves separately defined. For example, lets say I would like to describe a file with following properties:
- id
- fileName
- fileType
where fileType is an object with id and a specific set of acceptable key-value combination, for example
- 0, Word
- 1, Excel
- 2, PDF
- ... etc
I am a bit confused on how to describe this with OpenApi 3 as from the documentation I can't seem to find a way to describe arrays with specific key - value combinations.
Right now I am using an enum like below
components:
schemas:
fileType:
type: string
description: file type
enum:
- Word
- Excel
- PDF
but that is inadequate. Thanks
