|
| 1 | +openapi: 3.0.1 |
| 2 | +info: |
| 3 | + title: API Specification for x-linode-cli-skip Tests |
| 4 | + version: 1.0.0 |
| 5 | +servers: |
| 6 | + - url: http://localhost/v4 |
| 7 | + |
| 8 | +paths: |
| 9 | + /skip/test: |
| 10 | + x-linode-cli-command: skip-test |
| 11 | + get: |
| 12 | + summary: Test GET with skipped response attributes |
| 13 | + operationId: getSkipTest |
| 14 | + x-linode-cli-action: list |
| 15 | + description: List items with some attributes skipped |
| 16 | + responses: |
| 17 | + '200': |
| 18 | + description: Successful response with skipped attributes |
| 19 | + content: |
| 20 | + application/json: |
| 21 | + schema: |
| 22 | + type: object |
| 23 | + properties: |
| 24 | + data: |
| 25 | + type: array |
| 26 | + items: |
| 27 | + $ref: '#/components/schemas/SkipTestResponse' |
| 28 | + page: |
| 29 | + $ref: '#/components/schemas/PaginationEnvelope/properties/page' |
| 30 | + pages: |
| 31 | + $ref: '#/components/schemas/PaginationEnvelope/properties/pages' |
| 32 | + results: |
| 33 | + $ref: '#/components/schemas/PaginationEnvelope/properties/results' |
| 34 | + post: |
| 35 | + summary: Create with skipped request attributes |
| 36 | + operationId: createSkipTest |
| 37 | + x-linode-cli-action: create |
| 38 | + description: Create an item with some request attributes skipped |
| 39 | + requestBody: |
| 40 | + description: Parameters for creating the item |
| 41 | + required: true |
| 42 | + content: |
| 43 | + application/json: |
| 44 | + schema: |
| 45 | + required: |
| 46 | + - visible_field |
| 47 | + allOf: |
| 48 | + - $ref: '#/components/schemas/SkipTestRequest' |
| 49 | + responses: |
| 50 | + '200': |
| 51 | + description: Successful response |
| 52 | + content: |
| 53 | + application/json: |
| 54 | + schema: |
| 55 | + $ref: '#/components/schemas/SkipTestResponse' |
| 56 | + |
| 57 | +components: |
| 58 | + schemas: |
| 59 | + PaginationEnvelope: |
| 60 | + type: object |
| 61 | + properties: |
| 62 | + pages: |
| 63 | + type: integer |
| 64 | + readOnly: true |
| 65 | + description: The total number of pages. |
| 66 | + example: 1 |
| 67 | + page: |
| 68 | + type: integer |
| 69 | + readOnly: true |
| 70 | + description: The current page. |
| 71 | + example: 1 |
| 72 | + results: |
| 73 | + type: integer |
| 74 | + readOnly: true |
| 75 | + description: The total number of results. |
| 76 | + example: 1 |
| 77 | + |
| 78 | + SkipTestRequest: |
| 79 | + type: object |
| 80 | + description: Request object with skipped fields |
| 81 | + properties: |
| 82 | + visible_field: |
| 83 | + type: string |
| 84 | + description: This field should be visible |
| 85 | + skipped_request_field: |
| 86 | + type: string |
| 87 | + x-linode-cli-skip: true |
| 88 | + description: This field should be skipped in request |
| 89 | + another_visible_field: |
| 90 | + type: integer |
| 91 | + description: Another visible field |
| 92 | + skipped_both_field: |
| 93 | + type: string |
| 94 | + x-linode-cli-skip: true |
| 95 | + description: This field should be skipped in both request and response |
| 96 | + nested_object: |
| 97 | + type: object |
| 98 | + properties: |
| 99 | + nested_visible_field: |
| 100 | + type: string |
| 101 | + description: This nested field should be visible |
| 102 | + nested_skipped_field: |
| 103 | + type: string |
| 104 | + x-linode-cli-skip: true |
| 105 | + description: This nested field should be skipped |
| 106 | + |
| 107 | + SkipTestResponse: |
| 108 | + type: object |
| 109 | + description: Response object with skipped fields |
| 110 | + properties: |
| 111 | + id: |
| 112 | + type: integer |
| 113 | + readOnly: true |
| 114 | + description: The unique ID |
| 115 | + visible_field: |
| 116 | + type: string |
| 117 | + description: This field should be visible |
| 118 | + skipped_response_field: |
| 119 | + type: string |
| 120 | + x-linode-cli-skip: true |
| 121 | + description: This field should be skipped in response |
| 122 | + another_visible_field: |
| 123 | + type: integer |
| 124 | + description: Another visible field |
| 125 | + skipped_both_field: |
| 126 | + type: string |
| 127 | + x-linode-cli-skip: true |
| 128 | + description: This field should be skipped in both request and response |
| 129 | + nested_object: |
| 130 | + type: object |
| 131 | + properties: |
| 132 | + nested_visible_field: |
| 133 | + type: string |
| 134 | + description: This nested field should be visible |
| 135 | + nested_skipped_field: |
| 136 | + type: string |
| 137 | + x-linode-cli-skip: true |
| 138 | + description: This nested field should be skipped |
0 commit comments