Download OpenAPI specification:Download
This is a sample OpenAPI 3.0 schema generated from a Django project using Djagger.
View the Django project that generated this document on Github: https://github.com/royhzq/djagger-example.
Update an existing Toy by Id
Toy Schema
| id | integer (Id) |
| name required | string (Name) |
object (Category) Toy Category | |
| photoUrls required | Array of strings (Photourls) |
Array of objects (Tags) | |
| status | string (Status) Default: "available" Enum: "available" "pending" "sold" An enumeration. |
{- "id": 10,
- "name": "doggie",
- "category": {
- "id": 1,
- "name": "Dogs"
}, - "photoUrls": [
- "string"
], - "tags": [
- {
- "id": 0,
- "name": "string"
}
], - "status": "available"
}{- "id": 10,
- "name": "doggie",
- "category": {
- "id": 1,
- "name": "Dogs"
}, - "photoUrls": [
- "string"
], - "tags": [
- {
- "id": 0,
- "name": "string"
}
], - "status": "available"
}Add a new Toy to the store
Toy Schema
| id | integer (Id) |
| name required | string (Name) |
object (Category) Toy Category | |
| photoUrls required | Array of strings (Photourls) |
Array of objects (Tags) | |
| status | string (Status) Default: "available" Enum: "available" "pending" "sold" An enumeration. |
{- "id": 10,
- "name": "doggie",
- "category": {
- "id": 1,
- "name": "Dogs"
}, - "photoUrls": [
- "string"
], - "tags": [
- {
- "id": 0,
- "name": "string"
}
], - "status": "available"
}{- "id": 10,
- "name": "doggie",
- "category": {
- "id": 1,
- "name": "Dogs"
}, - "photoUrls": [
- "string"
], - "tags": [
- {
- "id": 0,
- "name": "string"
}
], - "status": "available"
}Find Toys by status
| status | string (status) Default: "available" Enum: "available" "pending" "sold" Enum of status |
[- {
- "id": 0,
- "name": "string",
- "category": {
- "id": 0,
- "name": "string"
}, - "photoUrls": [
- "string"
], - "tags": [
- {
- "id": 0,
- "name": "string"
}
], - "status": "available"
}
]Multiple tags can be provided with comma separated strings. e.g., ?tags=tag1,tag2
| tags | Array of strings (tags) Example: tags=Dog,Cat Relevant tags |
[- {
- "id": 0,
- "name": "string",
- "category": {
- "id": 0,
- "name": "string"
}, - "photoUrls": [
- "string"
], - "tags": [
- {
- "id": 0,
- "name": "string"
}
], - "status": "available"
}
]| toyId required | integer (toyId) ID of Toy to return |
| additionalMetadata | string (additionalMetadata) |
Example values are not available for application/octet-stream media types.
{- "code": 0,
- "type": "string",
- "message": "string"
}| id required | integer (Id) |
| toyId required | integer (Toyid) |
| quantity required | integer (Quantity) |
| shipDate required | string <date-time> (Shipdate) |
| status required | string (OrderStatus) Enum: "placed" "approved" "delivered" An enumeration. |
| complete required | boolean (Complete) |
{- "id": 0,
- "toyId": 0,
- "quantity": 0,
- "shipDate": "2019-08-24T14:15:22Z",
- "status": "placed",
- "complete": true
}{- "id": 0,
- "toyId": 0,
- "quantity": 0,
- "shipDate": "2019-08-24T14:15:22Z",
- "status": "placed",
- "complete": true
}POST schema for blog article creation
| title required | string (Title) Title of Blog article |
| content required | string (Content) Blog article content |
{- "title": "string",
- "content": "string"
}{- "created": "2019-08-24T14:15:22Z",
- "title": "string",
- "author": "string",
- "content": "string"
}| pk required | integer (Pk) Primary key of article to update |
| title | string (Title) |
| content | string (Content) |
{- "pk": 0,
- "title": "string",
- "content": "string"
}{- "created": "2019-08-24T14:15:22Z",
- "title": "string",
- "author": "string",
- "content": "string"
}List all articles given a year
| year required | integer (year) |
| page | integer (page) |
| username | string (username) |
| api_key | string (api_key) |
[- {
- "created": "2019-08-24T14:15:22Z",
- "title": "string",
- "author": "string",
- "content": "string"
}
]This can only be done by the logged in user.
A User object
| id required | integer (Id) |
| username required | string (Username) |
| firstName required | string (Firstname) |
| lastName required | string (Lastname) |
| email required | string (Email) |
| password required | string (Password) |
| phone required | string (Phone) |
| userStatus required | integer (Userstatus) |
{- "id": 10,
- "username": "theUser",
- "firstName": "John",
- "lastName": "James",
- "email": "john@email.com",
- "password": "12345",
- "phone": "12345",
- "userStatus": 4
}{- "id": 10,
- "username": "theUser",
- "firstName": "John",
- "lastName": "James",
- "email": "john@email.com",
- "password": "12345",
- "phone": "12345",
- "userStatus": 4
}Creates list of users with given input array
Array of User objects
| id required | integer (Id) |
| username required | string (Username) |
| firstName required | string (Firstname) |
| lastName required | string (Lastname) |
| email required | string (Email) |
| password required | string (Password) |
| phone required | string (Phone) |
| userStatus required | integer (Userstatus) |
[- {
- "id": 0,
- "username": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "password": "string",
- "phone": "string",
- "userStatus": 0
}
][- {
- "id": 0,
- "username": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "password": "string",
- "phone": "string",
- "userStatus": 0
}
]Retrieve a User by username
| username required | string (username) The username of the User that needs to be fetched. |
{- "id": 10,
- "username": "theUser",
- "firstName": "John",
- "lastName": "James",
- "email": "john@email.com",
- "password": "12345",
- "phone": "12345",
- "userStatus": 4
}Update a User by username
| username required | string (username) The username of the User that needs to be fetched. |
{- "id": 10,
- "username": "theUser",
- "firstName": "John",
- "lastName": "James",
- "email": "john@email.com",
- "password": "12345",
- "phone": "12345",
- "userStatus": 4
}