-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support info extensions via environment (#423)
* #395 support info-extensions definition in environment * #395 changed extensionfields in ConfigDocket.Info to Map<String,String> * #395 Integration tests for info/contact/license extensions in amqp-examples * #395 reverted rename of asycnapi.json in amqp-examples --------- Co-authored-by: Thomas Vahrst <[email protected]>
- Loading branch information
Showing
11 changed files
with
428 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
######### | ||
# Spring configuration | ||
spring.application.name=Springwolf example project - Amqp | ||
spring.application.name=Springwolf example project - AMQP | ||
|
||
|
||
######### | ||
|
@@ -19,10 +19,13 @@ springwolf.docket.info.title=${spring.application.name} | |
springwolf.docket.info.version=1.0.0 | ||
springwolf.docket.info.description=Springwolf example project to demonstrate springwolfs abilities | ||
springwolf.docket.info.terms-of-service=http://asyncapi.org/terms | ||
springwolf.docket.info.extension-fields.x-api-audience=company-internal | ||
springwolf.docket.info.contact.name=springwolf | ||
springwolf.docket.info.contact.email=[email protected] | ||
springwolf.docket.info.contact.url=https://github.com/springwolf/springwolf-core | ||
springwolf.docket.info.contact.extension-fields.x-phone=+49 123 456789 | ||
springwolf.docket.info.license.name=Apache License 2.0 | ||
springwolf.docket.info.license.extension-fields.x-desc=some description | ||
springwolf.docket.servers.amqp.protocol=amqp | ||
springwolf.docket.servers.amqp.url=${spring.rabbitmq.host}:${spring.rabbitmq.port} | ||
|
||
|
17 changes: 17 additions & 0 deletions
17
...t/java/io/github/stavshamir/springwolf/example/amqp/ApiWithDocketBeanIntegrationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
package io.github.stavshamir.springwolf.example.amqp; | ||
|
||
import org.springframework.test.context.TestPropertySource; | ||
|
||
/** | ||
* Api integrationtest based on a SpringBoot application that defines a custom Docket bean. This contains Info and | ||
* Server Informations as well as some explicit Producer and Consumer definitions. | ||
*/ | ||
@TestPropertySource(properties = {"customAsyncApiDocketBean=true"}) | ||
public class ApiWithDocketBeanIntegrationTest extends BaseApiIntegrationTest { | ||
|
||
@Override | ||
protected String getExpectedApiFileName() { | ||
return "/asyncapi.json"; | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
...ithub/stavshamir/springwolf/example/amqp/ApiWithDocketFromEnvironmentIntegrationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
package io.github.stavshamir.springwolf.example.amqp; | ||
|
||
import org.springframework.test.context.TestPropertySource; | ||
|
||
/** | ||
* Api integrationtest based on a SpringBoot application that defines all info and server properties via | ||
* spring environment (from application.properties). | ||
*/ | ||
@TestPropertySource(properties = {"customAsyncApiDocketBean=false"}) | ||
public class ApiWithDocketFromEnvironmentIntegrationTest extends BaseApiIntegrationTest { | ||
|
||
@Override | ||
protected String getExpectedApiFileName() { | ||
return "/asyncapi_withdocketfromenvironment.json"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,11 +7,14 @@ | |
"contact": { | ||
"name": "springwolf", | ||
"url": "https://github.com/springwolf/springwolf-core", | ||
"email": "[email protected]" | ||
"email": "[email protected]", | ||
"x-phone": "+49 123 456789" | ||
}, | ||
"license": { | ||
"name": "Apache License 2.0" | ||
} | ||
"name": "Apache License 2.0", | ||
"x-desc": "some description" | ||
}, | ||
"x-api-audience": "company-internal" | ||
}, | ||
"defaultContentType": "application/json", | ||
"servers": { | ||
|
Oops, something went wrong.