Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set min/max for port range in config JSON Schema #345

Merged
merged 2 commits into from
Jan 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .schemas/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -869,8 +869,11 @@
"port": {
"type": "number",
"default": 4456,
"examples": [4456],
"title": "Port",
"description": "The port to listen on."
"description": "The port to listen on.",
"minimum": 1,
"maximum": 65535
},
"host": {
"type": "string",
Expand Down Expand Up @@ -898,8 +901,11 @@
"port": {
"type": "number",
"default": 4455,
"examples": [4455],
"title": "Port",
"description": "The port to listen on."
"description": "The port to listen on.",
"minimum": 1,
"maximum": 65535
},
"host": {
"type": "string",
Expand Down
15 changes: 9 additions & 6 deletions docs/api.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@
},
"definitions": {
"Upstream": {
"description": "Upstream Upstream Upstream Upstream Upstream Upstream Upstream upstream",
"description": "Upstream Upstream Upstream Upstream Upstream Upstream Upstream Upstream upstream",
"type": "object",
"properties": {
"preserve_host": {
Expand All @@ -536,6 +536,7 @@
}
},
"healthNotReadyStatus": {
"description": "HealthNotReadyStatus health not ready status",
"type": "object",
"properties": {
"errors": {
Expand All @@ -548,7 +549,7 @@
}
},
"healthStatus": {
"description": "HealthStatus HealthStatus HealthStatus HealthStatus HealthStatus health status",
"description": "HealthStatus HealthStatus HealthStatus HealthStatus HealthStatus HealthStatus health status",
"type": "object",
"properties": {
"status": {
Expand All @@ -558,7 +559,7 @@
}
},
"jsonWebKey": {
"description": "JSONWebKey json web key",
"description": "JSONWebKey JSONWebKey json web key",
"type": "object",
"properties": {
"alg": {
Expand Down Expand Up @@ -635,6 +636,7 @@
}
},
"jsonWebKeySet": {
"description": "JSONWebKeySet json web key set",
"type": "object",
"properties": {
"keys": {
Expand All @@ -648,7 +650,7 @@
},
"rule": {
"type": "object",
"title": "swaggerRule is a single rule that will get checked on every HTTP request.",
"title": "Rule swaggerRule is a single rule that will get checked on every HTTP request.",
"properties": {
"authenticators": {
"description": "Authenticators is a list of authentication handlers that will try and authenticate the provided credentials.\nAuthenticators are checked iteratively from index 0 to n and if the first authenticator to return a positive\nresult will be the one used.\n\nIf you want the rule to first check a specific authenticator before \"falling back\" to others, have that authenticator\nas the first item in the array.",
Expand Down Expand Up @@ -684,6 +686,7 @@
}
},
"ruleHandler": {
"description": "RuleHandler rule handler",
"type": "object",
"properties": {
"config": {
Expand All @@ -697,7 +700,7 @@
}
},
"ruleMatch": {
"description": "RuleMatch RuleMatch rule match",
"description": "RuleMatch RuleMatch RuleMatch rule match",
"type": "object",
"properties": {
"methods": {
Expand All @@ -714,7 +717,7 @@
}
},
"version": {
"description": "Version Version Version Version Version version",
"description": "Version Version Version Version Version Version version",
"type": "object",
"properties": {
"version": {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ require (
github.com/ory/ladon v1.0.1
github.com/ory/sdk/swagutil v0.0.0-20200116101926-c5b88ce6e4bd // indirect
github.com/ory/viper v1.5.6
github.com/ory/x v0.0.88
github.com/ory/x v0.0.89
github.com/pborman/uuid v1.2.0
github.com/pelletier/go-toml v1.6.0 // indirect
github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,8 @@ github.com/ory/x v0.0.87 h1:C81kgyXDE1MgL0aPp2fHmHNbMlgQwicdrEmPbICG0Wk=
github.com/ory/x v0.0.87/go.mod h1:wrnJRjIfYXFY/AUiuUlcIUpLBDxFtWc+8x6toAeLZXU=
github.com/ory/x v0.0.88 h1:epgeKh5kaT/89YQ9o/eIO3rgwmo3kOwyXcHJRZcZogI=
github.com/ory/x v0.0.88/go.mod h1:wrnJRjIfYXFY/AUiuUlcIUpLBDxFtWc+8x6toAeLZXU=
github.com/ory/x v0.0.89 h1:8jYqLy3BDmVjWUoi30Rt34m+/DdLF8OiZ0NjzSDS0bE=
github.com/ory/x v0.0.89/go.mod h1:wrnJRjIfYXFY/AUiuUlcIUpLBDxFtWc+8x6toAeLZXU=
github.com/parnurzeal/gorequest v0.2.15/go.mod h1:3Kh2QUMJoqw3icWAecsyzkpY7UzRfDhbRdTjtNwNiUE=
github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g=
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
Expand Down
2 changes: 1 addition & 1 deletion internal/httpclient/models/health_not_ready_status.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/httpclient/models/health_status.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/httpclient/models/json_web_key.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/httpclient/models/json_web_key_set.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/httpclient/models/rule.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/httpclient/models/rule_handler.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/httpclient/models/rule_match.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/httpclient/models/upstream.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/httpclient/models/version.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.