mirror of
https://github.com/davidebianchi/gswagger.git
synced 2025-12-23 23:38:43 -05:00
187 lines
4.6 KiB
JSON
187 lines
4.6 KiB
JSON
{
|
|
"components": {},
|
|
"info": {
|
|
"title": "my title",
|
|
"version": "1.0.0"
|
|
},
|
|
"openapi": "3.0.0",
|
|
"paths": {
|
|
"/cars/{carId}/drivers/{driverId}": {
|
|
"get": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "carId",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "driverId",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/users": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"items": {
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"address": {
|
|
"title": "user address",
|
|
"type": "string"
|
|
},
|
|
"groups": {
|
|
"default": [
|
|
"users"
|
|
],
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"title": "groups of the user",
|
|
"type": "array"
|
|
},
|
|
"name": {
|
|
"example": "Jane",
|
|
"title": "The user name",
|
|
"type": "string"
|
|
},
|
|
"phone": {
|
|
"title": "mobile number of user",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"phone",
|
|
"address"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
}
|
|
}
|
|
},
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"address": {
|
|
"title": "user address",
|
|
"type": "string"
|
|
},
|
|
"groups": {
|
|
"default": [
|
|
"users"
|
|
],
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"title": "groups of the user",
|
|
"type": "array"
|
|
},
|
|
"name": {
|
|
"example": "Jane",
|
|
"title": "The user name",
|
|
"type": "string"
|
|
},
|
|
"phone": {
|
|
"title": "mobile number of user",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"phone",
|
|
"address"
|
|
],
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"201": {
|
|
"content": {
|
|
"text/html": {
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"description": ""
|
|
},
|
|
"401": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"message"
|
|
],
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "invalid request"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/users/{userId}": {
|
|
"get": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "userId",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "query",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|