Created
December 26, 2023 17:45
-
-
Save rohanrajpal/32b2e274e19b8bbb640fdd12f5971433 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| openapi: 3.0.0 | |
| paths: | |
| /contacts/{id}: | |
| get: | |
| operationId: ContactController_findContactById | |
| parameters: | |
| - name: id | |
| required: true | |
| in: path | |
| schema: | |
| type: number | |
| responses: | |
| '200': | |
| description: '' | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/ContactDto' | |
| tags: | |
| - Contact | |
| patch: | |
| operationId: ContactController_editContact | |
| parameters: | |
| - name: id | |
| required: true | |
| in: path | |
| schema: | |
| type: number | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/UpdateContactDto' | |
| responses: | |
| '200': | |
| description: '' | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/ContactDto' | |
| tags: | |
| - Contact | |
| /contacts: | |
| post: | |
| operationId: ContactController_addContact | |
| parameters: [] | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/CreateContactDto' | |
| responses: | |
| '201': | |
| description: '' | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/ContactDto' | |
| tags: | |
| - Contact | |
| get: | |
| operationId: ContactController_listContacts | |
| parameters: | |
| - name: limit | |
| required: false | |
| in: query | |
| description: The number of contacts to return. | |
| schema: | |
| default: 20 | |
| type: number | |
| - name: query | |
| required: false | |
| in: query | |
| description: >- | |
| Searches (case insensitive) for contacts with name, email, number, | |
| username, firstName, lastName | |
| schema: | |
| type: string | |
| - name: cursor | |
| required: false | |
| in: query | |
| schema: | |
| type: number | |
| responses: | |
| '200': | |
| description: '' | |
| content: | |
| application/json: | |
| schema: | |
| type: array | |
| items: | |
| $ref: '#/components/schemas/ContactDto' | |
| tags: | |
| - Contact | |
| /contacts/{id}/tags: | |
| post: | |
| operationId: ContactController_addTagToContact | |
| parameters: | |
| - name: id | |
| required: true | |
| in: path | |
| schema: | |
| type: number | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| oneOf: | |
| - $ref: '#/components/schemas/TagNameDto' | |
| - $ref: '#/components/schemas/TagIdDto' | |
| responses: | |
| '201': | |
| description: '' | |
| content: | |
| application/json: | |
| schema: | |
| type: array | |
| items: | |
| $ref: '#/components/schemas/ContactTag' | |
| tags: | |
| - Tags | |
| /contacts/{id}/tags/delete: | |
| post: | |
| operationId: ContactController_deleteTagFromContact | |
| parameters: | |
| - name: id | |
| required: true | |
| in: path | |
| schema: | |
| type: number | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| oneOf: | |
| - $ref: '#/components/schemas/TagNameDto' | |
| - $ref: '#/components/schemas/TagIdDto' | |
| responses: | |
| '201': | |
| description: '' | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/ContactTag' | |
| tags: | |
| - Tags | |
| /contacts/{id}/custom-fields: | |
| post: | |
| operationId: ContactController_addCustomFieldToContact | |
| parameters: | |
| - name: id | |
| required: true | |
| in: path | |
| schema: | |
| type: number | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/AddCustomFieldDto' | |
| responses: | |
| '201': | |
| description: '' | |
| tags: | |
| - Custom Fields | |
| /contacts/{id}/custom-fields/update: | |
| post: | |
| operationId: ContactController_updateCustomFieldOfContact | |
| parameters: | |
| - name: id | |
| required: true | |
| in: path | |
| schema: | |
| type: number | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/AddCustomFieldDto' | |
| responses: | |
| '201': | |
| description: '' | |
| tags: | |
| - Custom Fields | |
| /contacts/{id}/custom-fields/delete: | |
| post: | |
| operationId: ContactController_deleteCustomFieldFromContact | |
| parameters: | |
| - name: id | |
| required: true | |
| in: path | |
| schema: | |
| type: number | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/DeleteCustomFieldDto' | |
| responses: | |
| '201': | |
| description: '' | |
| tags: | |
| - Custom Fields | |
| info: | |
| title: Spur APIs | |
| description: APIs containing auth and many other things in spur | |
| version: 0.1.0 | |
| contact: {} | |
| tags: [] | |
| servers: | |
| - url: https://api.meetspur.app | |
| description: Production | |
| components: | |
| securitySchemes: | |
| bearerToken: | |
| scheme: Bearer | |
| bearerFormat: Bearer | |
| description: '[just text field] Please enter token in following format: Bearer <JWT>' | |
| name: Authorization | |
| type: http | |
| in: Header | |
| schemas: | |
| ContactDto: | |
| type: object | |
| properties: | |
| id: | |
| type: number | |
| firstName: | |
| type: string | |
| lastName: | |
| type: string | |
| email: | |
| type: string | |
| number: | |
| type: string | |
| required: | |
| - id | |
| - firstName | |
| - lastName | |
| - number | |
| UpdateContactDto: | |
| type: object | |
| properties: | |
| firstName: | |
| type: string | |
| lastName: | |
| type: string | |
| email: | |
| type: string | |
| number: | |
| type: string | |
| required: | |
| - firstName | |
| - lastName | |
| - number | |
| CreateContactDto: | |
| type: object | |
| properties: | |
| firstName: | |
| type: string | |
| lastName: | |
| type: string | |
| email: | |
| type: string | |
| number: | |
| type: string | |
| name: | |
| type: string | |
| required: | |
| - firstName | |
| - lastName | |
| TagIdDto: | |
| type: object | |
| properties: | |
| id: | |
| type: number | |
| required: | |
| - id | |
| TagNameDto: | |
| type: object | |
| properties: | |
| name: | |
| type: string | |
| required: | |
| - name | |
| ContactTag: | |
| type: object | |
| properties: | |
| id: | |
| type: number | |
| title: | |
| type: string | |
| createdAt: | |
| format: date-time | |
| type: string | |
| updatedAt: | |
| format: date-time | |
| type: string | |
| required: | |
| - id | |
| - title | |
| - createdAt | |
| - updatedAt | |
| AddCustomFieldDto: | |
| type: object | |
| properties: | |
| value: | |
| description: Value can be any type of data | |
| oneOf: | |
| - type: string | |
| - type: number | |
| - type: string | |
| format: date-time | |
| name: | |
| type: string | |
| required: | |
| - value | |
| - name | |
| DeleteCustomFieldDto: | |
| type: object | |
| properties: | |
| name: | |
| type: string | |
| required: | |
| - name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment