Closed
Description
Is it possible to reference query parameter to enum defined in definitions
? For example consider following example:
paths:
/users/test:
get:
summary: Test endpoint
parameters:
- name: osType
in: query
description: Client's OS type.
required: true
type: string
enum:
- ios
- android
then I define this
definitions:
OsTypes:
type: string
enum:
- ios
- android
Can I reference it from endpoint to avoid defining allowed values of the enum in every endpoint that uses it ?
I tried
schema:
$ref: '#/definitions/OsTypes'
Thanks!
Metadata
Metadata
Assignees
Labels
No labels