Skip to content

Instantly share code, notes, and snippets.

@etshy
Created September 22, 2023 08:11
Show Gist options
  • Save etshy/2a97c7a968936036b86b64910c548d6e to your computer and use it in GitHub Desktop.
Save etshy/2a97c7a968936036b86b64910c548d6e to your computer and use it in GitHub Desktop.
openapi-codegen-request-body-name.json
{
"openapi": "3.0.0",
"info": {
"title": "XXX",
"description": "XXX",
"version": "0.0.1"
},
"servers": [
{
"url": "http:\/\/localhost"
}
],
"paths": {
"\/users": {
"post": {
"tags": [
"Users"
],
"operationId": "createUser",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application\/json": {
"schema": {
"$ref": "#\/components\/schemas\/CreateUserCommand"
}
}
},
"x-codegen-request-body-name": "command"
},
"responses": {
"201": {
"description": "",
"content": {
"application\/json": {
"schema": {
"$ref": "#\/components\/schemas\/CreateUserCommandResponse"
}
}
}
},
"404": {
"description": "Not found"
}
},
"security": [
{
"Bearer": []
}
]
}
}
},
"components": {
"schemas": {
"CreateUserCommand": {
"properties": {
"professionalUser": {
"nullable": true,
"allOf": [
{
"$ref": "#\/components\/schemas\/CreateUserDto"
}
]
},
"id": {
"type": "string"
}
},
"type": "object"
},
"CreateUserCommandResponse": {
"properties": {
"createdAt": {
"type": "string",
"format": "date-time",
"nullable": true
},
"id": {
"type": "string"
}
},
"type": "object"
},
"CreateUserDto": {
"properties": {
"username": {
"type": "string"
},
"email": {
"type": "string"
},
"password": {
"type": "string"
}
},
"type": "object"
}
},
"securitySchemes": {
"Bearer": {
"type": "http",
"scheme": "bearer"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment