diff --git a/README.md b/README.md index eda3274..0f1d313 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ The plugin is considered production ready. The version 2.x.x of the plugin is su [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.openapitools.swagger/swagger-maven-plugin/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.openapitools.swagger/swagger-maven-plugin/) [![Javadoc](https://javadoc.io/badge/io.openapitools.swagger/swagger-maven-plugin/badge.svg)](https://www.javadoc.io/doc/io.openapitools.swagger/swagger-maven-plugin) -[![Build status](https://travis-ci.org/openapi-tools/swagger-maven-plugin.svg?branch=master)](https://travis-ci.org/openapi-tools/swagger-maven-plugin) +[![Build status](https://github.com/openapi-tools/swagger-maven-plugin/actions/workflows/ci.yaml/badge.svg)](https://github.com/openapi-tools/swagger-maven-plugin/actions/workflows/ci.yaml) [![Known Vulnerabilities](https://snyk.io/test/github/openapi-tools/swagger-maven-plugin/badge.svg)](https://snyk.io/test/github/openapi-tools/swagger-maven-plugin) diff --git a/mvnvm.properties b/mvnvm.properties index 9334e1f..89d2bf9 100644 --- a/mvnvm.properties +++ b/mvnvm.properties @@ -1 +1 @@ -mvn_version=3.6.3 +mvn_version=3.9.8 diff --git a/pom.xml b/pom.xml index 9d760f2..dca81cb 100644 --- a/pom.xml +++ b/pom.xml @@ -50,18 +50,18 @@ UTF-8 UTF-8 - 2.12.2 + 2.16.2 30.0-jre 1.8.0 2.7.0-01 2.0.4-04 1.0.8 - 2.1.7 + 2.2.22 2.3.0 2.1 4.13.1 3.5 - 3.6.0 + 3.9.7 3.3.0 3.2.0 0.9.12 diff --git a/src/test/resources/expectedOutput/full/open-api.json b/src/test/resources/expectedOutput/full/open-api.json index 7ff8c06..1a71fc2 100644 --- a/src/test/resources/expectedOutput/full/open-api.json +++ b/src/test/resources/expectedOutput/full/open-api.json @@ -1 +1 @@ -{"openapi":"3.0.1","info":{"title":"Title","description":"# Description\n\nThis is some description to be included.","termsOfService":"Terms","contact":{"name":"My Name","url":"https://google.com","email":"e@mail.com"},"license":{"name":"MIT","url":"https://license"},"version":"1.0.0","x-custom-property":"In Info"},"externalDocs":{"description":"Some external doc at config level","url":"https://example.org","x-custom-property":"In configs's external document"},"servers":[{"url":"https://{sub}.example.it/base/path","description":"Example URL","variables":{"sub":{"description":"The Subdomain","default":"services","enum":["services","web","main"],"x-custom-property":"In ServerVariable"}},"x-custom-property":"In Server"}],"security":[{"first":[]},{"third":["requiredScope1","requiredScope2"]}],"tags":[{"name":"MyTag","description":"MyDescription","externalDocs":{"description":"Some tag's external doc","url":"https://tag.example.org","x-custom-property":"In tag's external document"},"x-custom-property":"In tag"}],"paths":{"/accounts":{"get":{"operationId":"list","responses":{"default":{"description":"default response","content":{"application/hal+json":{}}}}}},"/accounts/{regNo}-{accountNo}":{"get":{"description":"Get single account","operationId":"get","parameters":[{"name":"regNo","in":"path","required":true,"schema":{"pattern":"^[0-9]{4}$","type":"string"}},{"name":"accountNo","in":"path","required":true,"schema":{"pattern":"^[0-9]+$","type":"string"}}],"responses":{"404":{"description":"No account found."}}},"put":{"description":"Create new or update existing account","operationId":"createOrUpdate","parameters":[{"name":"regNo","in":"path","required":true,"schema":{"pattern":"^[0-9]{4}$","type":"string"}},{"name":"accountNo","in":"path","required":true,"schema":{"pattern":"^[0-9]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountUpdateRepresentation"}}}},"responses":{"404":{"description":"No updating possible"}}}}},"components":{"schemas":{"AccountUpdateRepresentation":{"required":["name"],"type":"object","properties":{"accountNo":{"pattern":"^[0-9]+$","type":"string"},"name":{"pattern":".{1,40}","type":"string"},"regNo":{"pattern":"^[0-9]{4}$","type":"string"}}}},"securitySchemes":{"first":{"type":"apiKey","description":"Via web gateway","name":"X-API-TOKEN","in":"header"},"fourth":{"type":"openIdConnect","openIdConnectUrl":"https://id.example.org"},"second":{"type":"http","scheme":"MyCredentials","bearerFormat":"password"},"third":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.example.org","refreshUrl":"https://refresh.example.org","scopes":{"x":"y"},"x-custom-property":"In third SecurityScheme's implicit flow"},"password":{"tokenUrl":"https://token.example.org"},"clientCredentials":{"tokenUrl":"https://client.token.example.org"},"authorizationCode":{"authorizationUrl":"https://code.auth.example.org","tokenUrl":"https://code.token.example.org"},"x-custom-property":"In third SecurityScheme's flow"}}}},"x-custom-property":"In Config"} \ No newline at end of file +{"openapi":"3.0.1","info":{"title":"Title","description":"# Description\n\nThis is some description to be included.","termsOfService":"Terms","contact":{"name":"My Name","url":"https://google.com","email":"e@mail.com"},"license":{"name":"MIT","url":"https://license"},"version":"1.0.0","x-custom-property":"In Info"},"externalDocs":{"description":"Some external doc at config level","url":"https://example.org","x-custom-property":"In configs's external document"},"servers":[{"url":"https://{sub}.example.it/base/path","description":"Example URL","variables":{"sub":{"description":"The Subdomain","default":"services","enum":["services","web","main"],"x-custom-property":"In ServerVariable"}},"x-custom-property":"In Server"}],"security":[{"first":[]},{"third":["requiredScope1","requiredScope2"]}],"tags":[{"name":"MyTag","description":"MyDescription","externalDocs":{"description":"Some tag's external doc","url":"https://tag.example.org","x-custom-property":"In tag's external document"},"x-custom-property":"In tag"}],"paths":{"/accounts":{"get":{"operationId":"list","responses":{"default":{"description":"default response","content":{"application/hal+json":{}}}}}},"/accounts/{regNo}-{accountNo}":{"get":{"description":"Get single account","operationId":"get","parameters":[{"name":"regNo","in":"path","required":true,"schema":{"pattern":"^[0-9]{4}$","type":"string"}},{"name":"accountNo","in":"path","required":true,"schema":{"pattern":"^[0-9]+$","type":"string"}}],"responses":{"404":{"description":"No account found."}}},"put":{"description":"Create new or update existing account","operationId":"createOrUpdate","parameters":[{"name":"regNo","in":"path","required":true,"schema":{"pattern":"^[0-9]{4}$","type":"string"}},{"name":"accountNo","in":"path","required":true,"schema":{"pattern":"^[0-9]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountUpdateRepresentation"}}}},"responses":{"404":{"description":"No updating possible"}}}}},"components":{"schemas":{"AccountUpdateRepresentation":{"required":["name"],"type":"object","properties":{"accountNo":{"pattern":"^[0-9]+$","type":"string"},"name":{"pattern":".{1,40}","type":"string"},"regNo":{"pattern":"^[0-9]{4}$","type":"string"}}}},"securitySchemes":{"first":{"type":"apiKey","description":"Via web gateway","name":"X-API-TOKEN","in":"header","x-custom-property":"In first SecurityScheme"},"fourth":{"type":"openIdConnect","openIdConnectUrl":"https://id.example.org"},"second":{"type":"http","scheme":"MyCredentials","bearerFormat":"password"},"third":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.example.org","refreshUrl":"https://refresh.example.org","scopes":{"x":"y"},"x-custom-property":"In third SecurityScheme's implicit flow"},"password":{"tokenUrl":"https://token.example.org"},"clientCredentials":{"tokenUrl":"https://client.token.example.org"},"authorizationCode":{"authorizationUrl":"https://code.auth.example.org","tokenUrl":"https://code.token.example.org"},"x-custom-property":"In third SecurityScheme's flow"}}}},"x-custom-property":"In Config"} \ No newline at end of file diff --git a/src/test/resources/expectedOutput/full/open-api.yaml b/src/test/resources/expectedOutput/full/open-api.yaml index d7edb5f..530e257 100644 --- a/src/test/resources/expectedOutput/full/open-api.yaml +++ b/src/test/resources/expectedOutput/full/open-api.yaml @@ -120,6 +120,7 @@ components: description: Via web gateway name: X-API-TOKEN in: header + x-custom-property: In first SecurityScheme fourth: type: openIdConnect openIdConnectUrl: https://id.example.org