openapi: "3.0.0" info: description: This is the swagger file that goes with our server code version: "1.0.0" title: API First Article servers: - url: http://localhost:5000/api description: Development API server components: schemas: Person: type: object required: - fname - lname properties: fname: type: string description: First name of person to create lname: type: string description: Last name of person to create id: type: string description: ID Person PersonList: type: array items: type: object properties: fname: type: string lname: type: string id: type: string paths: /people: get: operationId: resources.people.find_all tags: - people summary: The people data structure supported by the server application description: Read the list of people parameters: - name: limit in: query schema: type: integer description: Number of people to get from people required: false - name: offset in: query schema: type: integer description: Offset from beginning of list where to start gathering people required: false responses: 200: description: Successful read people list operation content: application/json: schema: $ref: '#/components/schemas/PersonList' post: operationId: resources.people.create tags: - people summary: Create a person and add it to the people list description: Create a new person in the people list requestBody: required: true content: application/json: schema: x-body-name: person $ref: '#/components/schemas/Person' responses: 201: description: Person Created content: text/plain: schema: type: string headers: Location: schema: type: string description: Resource Location /people/{id}: delete: operationId: resources.people.remove tags: - people summary: Delete a person from the people list description: Delete a person parameters: - name: id in: path schema: type: string required: True responses: 200: description: Successfully deleted a person from people list content: text/plain: schema: type: string get: operationId: resources.people.find_one tags: - people summary: Read one person from the people list description: Read one person from the people list parameters: - name: id in: path required: True description: last name of the person to get from the list schema: type: string responses: 200: description: Successfully read person from people list operation content: application/json: schema: $ref: "#/components/schemas/Person" 404: description: Person not found content: text/plain: schema: type: string put: operationId: resources.people.update tags: - people summary: Update a person in the people list description: Update a person in the people list parameters: - name: id in: path required: True description: Last name of the person to update in the list schema: type: string requestBody: required: true content: application/json: schema: x-body-name: person $ref: '#/components/schemas/Person' responses: 200: description: Successfully updated person in people list content: text/plain: schema: type: string 404: description: Person not found in people list content: text/plain: schema: type: string