Skip to content

Instantly share code, notes, and snippets.

@josh-burton
Created November 22, 2021 21:24
Show Gist options
  • Save josh-burton/8062bc64212db27e2a2f879ae65c07dd to your computer and use it in GitHub Desktop.
Save josh-burton/8062bc64212db27e2a2f879ae65c07dd to your computer and use it in GitHub Desktop.
allOf dart-dio-next bug
{
"openapi": "3.0.0",
"info": {
"title": "TestApi",
"version": "1.0"
},
"paths": {
"/users/{userId}": {
"parameters": [
{
"schema": {
"type": "integer"
},
"name": "userId",
"in": "path",
"required": true,
"description": "Id of an existing user."
}
],
"get": {
"summary": "Get User Info by User ID",
"tags": [],
"operationId": "get-users-userId",
"description": "Retrieve the information of the user with the matching user ID.",
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/user": {}
},
"components": {
"schemas": {
"User": {
"type": "object",
"properties": {
"type": {
"allOf": [
{
"$ref": "#/components/schemas/UserType"
}
],
"description": "type of user"
}
}
},
"UserType": {
"type": "string",
"title": "UserType",
"enum": [
"admin",
"user"
]
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment