You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
305 lines
5.7 KiB
305 lines
5.7 KiB
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"description": "Bienvenue pour tester ma nouvelle api de sauvegarde des etudiants. http://localhost:3000",
|
|
"version": "1.0.0",
|
|
"title": "Documentation API - Etudiants",
|
|
"contact": {
|
|
"email": "art-dambrine@live.fr"
|
|
}
|
|
},
|
|
"host": "localhost",
|
|
"basePath": "/api",
|
|
"tags": [
|
|
{
|
|
"name": "pet",
|
|
"description": "Everything about your Pets"
|
|
}
|
|
],
|
|
"schemes": [
|
|
"http"
|
|
],
|
|
"paths": {
|
|
"/pet": {
|
|
"post": {
|
|
"tags": [
|
|
"pet"
|
|
],
|
|
"summary": "Add a new pet to the store",
|
|
"description": "",
|
|
"operationId": "addPet",
|
|
"consumes": [
|
|
"application/json",
|
|
"application/xml"
|
|
],
|
|
"produces": [
|
|
"application/xml",
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "body",
|
|
"name": "body",
|
|
"description": "Pet object that needs to be added to the store",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/Pet"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"405": {
|
|
"description": "Invalid input"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"petstore_auth": [
|
|
"write:pets",
|
|
"read:pets"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"pet"
|
|
],
|
|
"summary": "Update an existing pet",
|
|
"description": "",
|
|
"operationId": "updatePet",
|
|
"consumes": [
|
|
"application/json",
|
|
"application/xml"
|
|
],
|
|
"produces": [
|
|
"application/xml",
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "body",
|
|
"name": "body",
|
|
"description": "Pet object that needs to be added to the store",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/Pet"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"400": {
|
|
"description": "Invalid ID supplied"
|
|
},
|
|
"404": {
|
|
"description": "Pet not found"
|
|
},
|
|
"405": {
|
|
"description": "Validation exception"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"petstore_auth": [
|
|
"write:pets",
|
|
"read:pets"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/pet/{petId}": {
|
|
"get": {
|
|
"tags": [
|
|
"pet"
|
|
],
|
|
"summary": "Find pet by ID",
|
|
"description": "Returns a single pet",
|
|
"operationId": "getPetById",
|
|
"produces": [
|
|
"application/xml",
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "petId",
|
|
"in": "path",
|
|
"description": "ID of pet to return",
|
|
"required": true,
|
|
"type": "integer",
|
|
"format": "int64"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation",
|
|
"schema": {
|
|
"$ref": "#/definitions/Pet"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid ID supplied"
|
|
},
|
|
"404": {
|
|
"description": "Pet not found"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"api_key": []
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"pet"
|
|
],
|
|
"summary": "Updates a pet in the store with form data",
|
|
"description": "",
|
|
"operationId": "updatePetWithForm",
|
|
"consumes": [
|
|
"application/x-www-form-urlencoded"
|
|
],
|
|
"produces": [
|
|
"application/xml",
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "petId",
|
|
"in": "path",
|
|
"description": "ID of pet that needs to be updated",
|
|
"required": true,
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
{
|
|
"name": "name",
|
|
"in": "formData",
|
|
"description": "Updated name of the pet",
|
|
"required": false,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "formData",
|
|
"description": "Updated status of the pet",
|
|
"required": false,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"responses": {
|
|
"405": {
|
|
"description": "Invalid input"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"petstore_auth": [
|
|
"write:pets",
|
|
"read:pets"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"pet"
|
|
],
|
|
"summary": "Deletes a pet",
|
|
"description": "",
|
|
"operationId": "deletePet",
|
|
"produces": [
|
|
"application/xml",
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "api_key",
|
|
"in": "header",
|
|
"required": false,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "petId",
|
|
"in": "path",
|
|
"description": "Pet id to delete",
|
|
"required": true,
|
|
"type": "integer",
|
|
"format": "int64"
|
|
}
|
|
],
|
|
"responses": {
|
|
"400": {
|
|
"description": "Invalid ID supplied"
|
|
},
|
|
"404": {
|
|
"description": "Pet not found"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"petstore_auth": [
|
|
"write:pets",
|
|
"read:pets"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"Pet": {
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"photoUrls"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"category": {
|
|
"$ref": "#/definitions/Category"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"example": "doggie"
|
|
},
|
|
"photoUrls": {
|
|
"type": "array",
|
|
"xml": {
|
|
"name": "photoUrl",
|
|
"wrapped": true
|
|
},
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"tags": {
|
|
"type": "array",
|
|
"xml": {
|
|
"name": "tag",
|
|
"wrapped": true
|
|
},
|
|
"items": {
|
|
"$ref": "#/definitions/Tag"
|
|
}
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "pet status in the store",
|
|
"enum": [
|
|
"available",
|
|
"pending",
|
|
"sold"
|
|
]
|
|
}
|
|
},
|
|
"xml": {
|
|
"name": "Pet"
|
|
}
|
|
}
|
|
}
|
|
}
|