You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These fields are optional, though `url` and `email` need to be in the format of an email address (ed: what that might be, i'm not 100% sure... go read the email RFC(s)) and a url.
196
+
These fields are optional, though `url` needs to in the form of a URL and `email` needs to be in the format of an email address (ed: what that might be, I'm not 100% sure... go read the email RFC(s)).
197
+
198
+
This can be extended using the `^x-` specification extension.
193
199
194
200
#### License
195
201
@@ -205,6 +211,8 @@ custom:
205
211
206
212
Name is required but `url` is optional and must be in the format of a url.
207
213
214
+
This can be extended using the `^x-` specification extension.
215
+
208
216
#### Extended Fields
209
217
210
218
You can also add extended fields to the documentation object:
@@ -225,6 +233,58 @@ custom:
225
233
226
234
`other-field`here will not make it to the generated OpenAPI schema.
227
235
236
+
Currently extended specification fields defined under the `documentation` tag will sit under the OpenAPI `info` object e.g.
237
+
238
+
```yml
239
+
custom:
240
+
documentation:
241
+
title: myService
242
+
x-other-field: This is an extended field
243
+
```
244
+
245
+
converts to:
246
+
247
+
```json
248
+
{
249
+
"info": {
250
+
"title": "myService",
251
+
"x-other-field": "This is an extended field"
252
+
}
253
+
}
254
+
```
255
+
256
+
An exception to this is Redocly `x-tagGroups`. If defined, they will sit at the root level of the OpenAPI specification, e.g.
257
+
258
+
```yml
259
+
custom:
260
+
documentation:
261
+
title: myService
262
+
x-other-field: This is an extended field
263
+
x-tagGroups:
264
+
- name: Customers
265
+
tags:
266
+
- Customers
267
+
```
268
+
269
+
converts to:
270
+
271
+
```json
272
+
{
273
+
"info": {
274
+
"title": "myService",
275
+
"x-other-field": "This is an extended field"
276
+
},
277
+
"x-tagGroups": [
278
+
{
279
+
"name": "Customers",
280
+
"tags": ["Customers"]
281
+
}
282
+
]
283
+
}
284
+
```
285
+
286
+
#### Moving documentation to a separate file
287
+
228
288
These configurations can be quite verbose; you can separate it out into it's own file, such as `serverless.doc.yml` as below:
0 commit comments