Skip to content

Commit c60a968

Browse files
BeyerJCJan Christoph Beyersoyukaalanpoulain
authored
Configuration.md - Add 'openapi' section (#1249)
* * Add openapi configuration section * Apply suggestions from code review Co-authored-by: Alan Poulain <[email protected]> Co-authored-by: Jan Christoph Beyer <[email protected]> Co-authored-by: Antoine Bluchet <[email protected]> Co-authored-by: Alan Poulain <[email protected]>
1 parent e9cb74d commit c60a968

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

core/configuration.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,24 @@ api_platform:
199199
# Whether the api key should be a query parameter or a header.
200200
# type: 'query' or 'header'
201201

202+
openapi:
203+
# The contact information for the exposed API.
204+
contact:
205+
# The identifying name of the contact person/organization.
206+
name:
207+
# The URL pointing to the contact information. MUST be in the format of a URL.
208+
url:
209+
# The email address of the contact person/organization. MUST be in the format of an email address.
210+
email:
211+
# A URL to the Terms of Service for the API. MUST be in the format of a URL.
212+
termsOfService:
213+
# The license information for the exposed API.
214+
license:
215+
# The license name used for the API.
216+
name:
217+
# URL to the license used for the API. MUST be in the format of a URL.
218+
url:
219+
202220
http_cache:
203221
# Automatically generate etags for API responses.
204222
etag: true

core/openapi.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,3 +485,37 @@ api_platform:
485485
```
486486

487487
Note that `clientId` and `clientSecret` are being used by the SwaggerUI if enabled.
488+
## Info Object
489+
490+
The [info object](https://swagger.io/specification/#info-object) provides metadata about the API like licensing information or a contact. You can specify this information using API Platform's configuration:
491+
492+
```
493+
api_platform:
494+
495+
# The title of the API.
496+
title: 'API title'
497+
498+
# The description of the API.
499+
description: 'API description'
500+
501+
# The version of the API.
502+
version: '0.0.0'
503+
504+
openapi:
505+
# The contact information for the exposed API.
506+
contact:
507+
# The identifying name of the contact person/organization.
508+
name:
509+
# The URL pointing to the contact information. MUST be in the format of a URL.
510+
url:
511+
# The email address of the contact person/organization. MUST be in the format of an email address.
512+
email:
513+
# A URL to the Terms of Service for the API. MUST be in the format of a URL.
514+
termsOfService:
515+
# The license information for the exposed API.
516+
license:
517+
# The license name used for the API.
518+
name:
519+
# URL to the license used for the API. MUST be in the format of a URL.
520+
url:
521+
```

0 commit comments

Comments
 (0)