|
| 1 | +openapi: 3.0.1 |
| 2 | +info: |
| 3 | + version: '1.27' |
| 4 | + title: Example to show effects with Locale |
| 5 | + description: This definition was taken from a real world api which was working until 7.15.0. |
| 6 | +paths: |
| 7 | + /api/v1/brain/product/localizations/{productId}/{version}: |
| 8 | + post: |
| 9 | + operationId: getProductLocalizations |
| 10 | + summary: Get localization data for a product. |
| 11 | + parameters: |
| 12 | + - name: productId |
| 13 | + in: path |
| 14 | + description: Provide the id of the product. |
| 15 | + required: true |
| 16 | + schema: |
| 17 | + type: string |
| 18 | + minLength: 1 |
| 19 | + example: 1LE1X |
| 20 | + - name: version |
| 21 | + in: path |
| 22 | + description: Provide the version of the product. Could be 'LATEST' to retrieve the newest version. |
| 23 | + required: true |
| 24 | + schema: |
| 25 | + type: string |
| 26 | + minLength: 1 |
| 27 | + example: LATEST |
| 28 | + requestBody: |
| 29 | + description: Required payload for the request. |
| 30 | + required: true |
| 31 | + content: |
| 32 | + application/json: |
| 33 | + examples: |
| 34 | + 0 - Only language 'en': |
| 35 | + description: Language 'en' without country. |
| 36 | + summary: Only language 'en' |
| 37 | + value: |
| 38 | + locales: |
| 39 | + - language: en |
| 40 | + 1 - Multiple locales: |
| 41 | + description: Locale 'EN_en' and 'DE_de'. |
| 42 | + summary: Multiple locales |
| 43 | + value: |
| 44 | + locales: |
| 45 | + - country: EN |
| 46 | + language: en |
| 47 | + - country: DE |
| 48 | + language: de |
| 49 | + schema: |
| 50 | + $ref: '#/components/schemas/GetProductLocalizationsPayload' |
| 51 | + responses: |
| 52 | + '200': |
| 53 | + description: OK |
| 54 | + content: |
| 55 | + application/json: |
| 56 | + schema: |
| 57 | + $ref: '#/components/schemas/GetProductLocalizationsResult' |
| 58 | + '400': |
| 59 | + description: Bad Request |
| 60 | + content: |
| 61 | + application/problem+json: |
| 62 | + schema: |
| 63 | + $ref: '#/components/schemas/ProblemDetail' |
| 64 | + '401': |
| 65 | + description: Unauthorized |
| 66 | + content: |
| 67 | + application/problem+json: |
| 68 | + schema: |
| 69 | + $ref: '#/components/schemas/ProblemDetail' |
| 70 | + '403': |
| 71 | + description: Forbidden |
| 72 | + content: |
| 73 | + application/problem+json: |
| 74 | + schema: |
| 75 | + $ref: '#/components/schemas/ProblemDetail' |
| 76 | + '404': |
| 77 | + description: Not found |
| 78 | + content: |
| 79 | + application/problem+json: |
| 80 | + schema: |
| 81 | + $ref: '#/components/schemas/ProblemDetail' |
| 82 | + '500': |
| 83 | + description: Internal Server Error |
| 84 | + content: |
| 85 | + application/problem+json: |
| 86 | + schema: |
| 87 | + $ref: '#/components/schemas/ProblemDetail' |
| 88 | + security: |
| 89 | + - basicScheme: [] |
| 90 | + tags: |
| 91 | + - service |
| 92 | + - read |
| 93 | + - v1.24 |
| 94 | +components: |
| 95 | + schemas: |
| 96 | + CsticLocalization: |
| 97 | + description: Localization data of a Cstic. |
| 98 | + type: object |
| 99 | + properties: |
| 100 | + longText: |
| 101 | + type: string |
| 102 | + name: |
| 103 | + type: string |
| 104 | + numberPattern: |
| 105 | + type: string |
| 106 | + taggedTexts: |
| 107 | + $ref: '#/components/schemas/TaggedTexts' |
| 108 | + text: |
| 109 | + type: string |
| 110 | + unit: |
| 111 | + type: string |
| 112 | + values: |
| 113 | + type: array |
| 114 | + items: |
| 115 | + $ref: '#/components/schemas/Localization' |
| 116 | + ElementLocalization: |
| 117 | + description: Localization data of an Element. |
| 118 | + type: object |
| 119 | + properties: |
| 120 | + cstics: |
| 121 | + type: array |
| 122 | + items: |
| 123 | + $ref: '#/components/schemas/CsticLocalization' |
| 124 | + longText: |
| 125 | + type: string |
| 126 | + name: |
| 127 | + type: string |
| 128 | + taggedTexts: |
| 129 | + $ref: '#/components/schemas/TaggedTexts' |
| 130 | + text: |
| 131 | + type: string |
| 132 | + GetProductLocalizationsPayload: |
| 133 | + description: Container for locales. |
| 134 | + type: object |
| 135 | + properties: |
| 136 | + locales: |
| 137 | + type: array |
| 138 | + items: |
| 139 | + $ref: '#/components/schemas/Locale' |
| 140 | + GetProductLocalizationsResult: |
| 141 | + description: Result for product localization. |
| 142 | + type: object |
| 143 | + properties: |
| 144 | + error: |
| 145 | + type: string |
| 146 | + localizations: |
| 147 | + type: array |
| 148 | + items: |
| 149 | + $ref: '#/components/schemas/ProductLocalization' |
| 150 | + productId: |
| 151 | + type: string |
| 152 | + requestedLocales: |
| 153 | + type: array |
| 154 | + items: |
| 155 | + $ref: '#/components/schemas/Locale' |
| 156 | + returnedFailedLocales: |
| 157 | + type: array |
| 158 | + items: |
| 159 | + $ref: '#/components/schemas/Locale' |
| 160 | + returnedSuccessfulLocales: |
| 161 | + type: array |
| 162 | + items: |
| 163 | + $ref: '#/components/schemas/Locale' |
| 164 | + version: |
| 165 | + type: string |
| 166 | + Locale: |
| 167 | + description: Locale for localization. |
| 168 | + type: object |
| 169 | + properties: |
| 170 | + country: |
| 171 | + type: string |
| 172 | + language: |
| 173 | + type: string |
| 174 | + Localization: |
| 175 | + description: Localization data. |
| 176 | + type: object |
| 177 | + properties: |
| 178 | + longText: |
| 179 | + type: string |
| 180 | + name: |
| 181 | + type: string |
| 182 | + taggedTexts: |
| 183 | + $ref: '#/components/schemas/TaggedTexts' |
| 184 | + text: |
| 185 | + type: string |
| 186 | + ProblemDetail: |
| 187 | + type: object |
| 188 | + properties: |
| 189 | + detail: |
| 190 | + type: string |
| 191 | + instance: |
| 192 | + type: string |
| 193 | + format: uri |
| 194 | + properties: |
| 195 | + type: object |
| 196 | + additionalProperties: |
| 197 | + type: object |
| 198 | + status: |
| 199 | + type: integer |
| 200 | + format: int32 |
| 201 | + title: |
| 202 | + type: string |
| 203 | + type: |
| 204 | + type: string |
| 205 | + format: uri |
| 206 | + ProductLocalization: |
| 207 | + description: Localization data of a Product. |
| 208 | + type: object |
| 209 | + properties: |
| 210 | + elements: |
| 211 | + type: array |
| 212 | + items: |
| 213 | + $ref: '#/components/schemas/ElementLocalization' |
| 214 | + globalCstics: |
| 215 | + type: array |
| 216 | + items: |
| 217 | + $ref: '#/components/schemas/CsticLocalization' |
| 218 | + locale: |
| 219 | + $ref: '#/components/schemas/Locale' |
| 220 | + longText: |
| 221 | + type: string |
| 222 | + messages: |
| 223 | + type: array |
| 224 | + items: |
| 225 | + $ref: '#/components/schemas/Localization' |
| 226 | + name: |
| 227 | + type: string |
| 228 | + taggedTexts: |
| 229 | + $ref: '#/components/schemas/TaggedTexts' |
| 230 | + text: |
| 231 | + type: string |
| 232 | + TaggedText: |
| 233 | + description: A text with free useable tags. See TextTag enum for known tags. |
| 234 | + type: object |
| 235 | + properties: |
| 236 | + tags: |
| 237 | + type: array |
| 238 | + items: |
| 239 | + type: string |
| 240 | + text: |
| 241 | + type: string |
| 242 | + TaggedTexts: |
| 243 | + type: object |
| 244 | + properties: |
| 245 | + texts: |
| 246 | + type: array |
| 247 | + items: |
| 248 | + $ref: '#/components/schemas/TaggedText' |
| 249 | + securitySchemes: |
| 250 | + basicScheme: |
| 251 | + scheme: basic |
| 252 | + type: http |
| 253 | +tags: |
| 254 | + - description: Commmon service operations |
| 255 | + name: service |
| 256 | + - description: Write operations |
| 257 | + name: write |
| 258 | + - description: Read operations |
| 259 | + name: read |
0 commit comments