Skip to content

Commit 37bdca2

Browse files
authored
added note to gradle plugin README about openApiFile parameter
1 parent 58c8b79 commit 37bdca2

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

modules/swagger-gradle-plugin/README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Parameter | Description | Required | Default
5858
`resourcePackages`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)|false|
5959
`resourceClasses`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)|false|
6060
`prettyPrint`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)|false|`TRUE`
61-
`openApiFile`|openapi file to be merged with resolved specification, see [config](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)|false|
61+
`openApiFile`|openapi file to be merged with resolved specification, equivalent to [config](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties) openAPI|false|
6262
`filterClass`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)|false|
6363
`readerClass`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)|false|
6464
`scannerClass`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)|false|
@@ -68,5 +68,23 @@ Parameter | Description | Required | Default
6868
`modelConverterClasses`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)|false|
6969
`contextId`|see [Context](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#context)|false|
7070

71-
***
7271

72+
**Note** parameter `openApiFile` corresponds to [config](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties) openAPI. It points to a location of a file in YAML or JSON format representing the input spec that will be merged with the resolved spec. Typically used to add Info section, or any other meta data.
73+
An example of such file:
74+
75+
```yaml
76+
openapi: 3.0.1
77+
info:
78+
version: '1.0'
79+
title: Swagger Pet Sample App Config File
80+
description: 'This is a sample server Petstore server. You can find out more
81+
about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net,
82+
#swagger](http://swagger.io/irc/). For this sample, you can use the api key
83+
special-key to test the authorization filters.'
84+
termsOfService: http://swagger.io/terms/
85+
contact:
86+
87+
license:
88+
name: Apache 2.0
89+
url: http://www.apache.org/licenses/LICENSE-2.0.html
90+
```

0 commit comments

Comments
 (0)