Skip to content

Commit

Permalink
Add default info to openapi config.
Browse files Browse the repository at this point in the history
  • Loading branch information
noboomu committed Oct 22, 2018
1 parent ab561e6 commit 5a7f99f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,12 @@ Proteus comes with two standard services that extend the ```io.sinistral.proteus
openapi="3.0.1"

# openapi info
info {
title = ${application.name}
version = ${application.version}
description="Proteus Server"
}

securitySchemes {
ApiKeyAuth = {
type="apiKey"
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/io/sinistral/proteus/modules/ConfigModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,14 @@ protected void configure()

Config referenceConfig = ConfigFactory.load(ConfigFactory.defaultReference());

config = ConfigFactory.load(config).withFallback(referenceConfig);
config = ConfigFactory.load(config).withFallback(referenceConfig);

if(configURL != null)
{
config = ConfigFactory.load(ConfigFactory.parseURL(configURL)).withFallback(config);
}
else if(configFile != null)
{

{
config = fileConfig(configFile).withFallback(config);
}

Expand Down
9 changes: 6 additions & 3 deletions src/main/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ openapi {
openapi="3.0.1"

# openapi info
info {
title = ${application.name}
version = ${application.version}
description="Proteus Server"
}

securitySchemes {
ApiKeyAuth = {
type="apiKey"
Expand All @@ -86,9 +92,6 @@ openapi {
description="Default Server"
}
]



}


Expand Down

0 comments on commit 5a7f99f

Please sign in to comment.