diff --git a/source/Stargate-API-Skeleton/StargateApplication.class.st b/source/Stargate-API-Skeleton/StargateApplication.class.st index e362e1e..344690b 100644 --- a/source/Stargate-API-Skeleton/StargateApplication.class.st +++ b/source/Stargate-API-Skeleton/StargateApplication.class.st @@ -88,45 +88,42 @@ StargateApplication class >> stackTraceDumpExtension [ { #category : 'private' } StargateApplication class >> stargateConfigurationParameters [ - ^ OrderedCollection new - add: (MandatoryConfigurationParameter - named: 'Public URL' - describedBy: - 'Public URL where the API is deployed. Used to create hypermedia links' - inside: self sectionsForStargateConfiguration - convertingWith: #asUrl); - add: (MandatoryConfigurationParameter - named: 'Port' - describedBy: 'Listening port' - inside: self sectionsForStargateConfiguration - convertingWith: #asNumber); - add: (MandatoryConfigurationParameter - named: 'Operations Secret' - describedBy: 'Secret key for checking JWT signatures' - inside: self sectionsForStargateConfiguration - convertingWith: #asByteArray) asSensitive; - add: (OptionalConfigurationParameter - named: 'Log Incoming HTTP Requests' - describedBy: - 'Boolean that indicates whether to log all the Incoming HTTP Requests' - inside: self sectionsForStargateConfiguration - defaultingTo: false - convertingWith: [ :value | value = 'true' ]); - add: (OptionalConfigurationParameter - named: 'Log Outgoing HTTP Requests' - describedBy: - 'Boolean that indicates whether to log all the Outgoing HTTP Requests' - inside: self sectionsForStargateConfiguration - defaultingTo: false - convertingWith: [ :value | value = 'true' ]); - add: ( OptionalConfigurationParameter - named: 'Concurrent Connections Threshold' - describedBy: - 'Set the maximum number of concurrent connections that I will accept. When this threshold is reached, a 503 Service Unavailable response will be sent and the connection will be closed' - inside: self sectionsForStargateConfiguration - defaultingTo: 32 - convertingWith: #asNumber ); - yourself + ^ OrderedCollection new + add: ( MandatoryConfigurationParameter + named: 'Public URL' + describedBy: 'Public URL where the API is deployed. Used to create hypermedia links' + inside: self sectionsForStargateConfiguration + convertingWith: #asUrl ); + add: ( MandatoryConfigurationParameter + named: 'Port' + describedBy: 'Listening port' + inside: self sectionsForStargateConfiguration + convertingWith: #asNumber ); + add: ( MandatoryConfigurationParameter + named: 'Operations Secret' + describedBy: 'Secret key for checking JWT signatures' + inside: self sectionsForStargateConfiguration + convertingWith: #asByteArray ) asSensitive; + add: ( OptionalConfigurationParameter + named: 'Log Incoming HTTP Requests' + describedBy: 'Boolean that indicates whether to log all the Incoming HTTP Requests' + inside: self sectionsForStargateConfiguration + defaultingTo: false + convertingWith: [ :value | value = 'true' ] ); + add: ( OptionalConfigurationParameter + named: 'Log Outgoing HTTP Requests' + describedBy: 'Boolean that indicates whether to log all the Outgoing HTTP Requests' + inside: self sectionsForStargateConfiguration + defaultingTo: false + convertingWith: [ :value | value = 'true' ] ); + add: ( OptionalConfigurationParameter + named: 'Concurrent Connections Threshold' + describedBy: + 'Set the maximum number of concurrent connections that I will accept. When this threshold is reached, a 503 Service Unavailable response will be sent and the connection will be closed' + inside: self sectionsForStargateConfiguration + defaultingTo: 32 + convertingWith: #asNumber ); + yourself ] { #category : 'accessing' } diff --git a/source/Stargate-Model/HTTPBasedRESTfulAPI.class.st b/source/Stargate-Model/HTTPBasedRESTfulAPI.class.st index 851e074..6f85582 100644 --- a/source/Stargate-Model/HTTPBasedRESTfulAPI.class.st +++ b/source/Stargate-Model/HTTPBasedRESTfulAPI.class.st @@ -25,7 +25,7 @@ Class { HTTPBasedRESTfulAPI class >> configuredBy: configuration installing: aRESTfulControllerCollection [ AssertionChecker enforce: [ aRESTfulControllerCollection notEmpty ] because: 'An API needs at least to expose one resource'. - + ^ self new initializeConfiguredBy: configuration installing: aRESTfulControllerCollection ]