Skip to content

Commit

Permalink
MINOR: spec: improve command example
Browse files Browse the repository at this point in the history
  • Loading branch information
gorangalinec authored and mjuraga committed Jan 11, 2023
1 parent 2acc069 commit 6832951
Show file tree
Hide file tree
Showing 15 changed files with 34 additions and 77 deletions.
3 changes: 3 additions & 0 deletions models/bind.go

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

7 changes: 6 additions & 1 deletion models/bind_params.go

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

14 changes: 0 additions & 14 deletions models/fcgi_app.go

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

2 changes: 1 addition & 1 deletion models/http_error_rule.go

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

21 changes: 1 addition & 20 deletions models/program.go

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

2 changes: 1 addition & 1 deletion models/server.go

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

2 changes: 1 addition & 1 deletion models/site.go

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

29 changes: 10 additions & 19 deletions specification/build/haproxy_spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ definitions:
type: string
name:
pattern: ^[A-Za-z0-9-_.:]+$
readOnly: true
type: string
x-nullable: false
start-on-reload:
Expand Down Expand Up @@ -92,7 +91,6 @@ definitions:
name:
description: Declares a FastCGI application
pattern: ^[^\s]+$
readOnly: true
type: string
x-nullable: false
pass_headers:
Expand Down Expand Up @@ -214,10 +212,6 @@ definitions:
type: object
bind_params:
additionalProperties: false
example:
address: 127.0.0.1
name: http
port: 80
properties:
accept_netscaler_cip:
type: integer
Expand Down Expand Up @@ -322,8 +316,10 @@ definitions:
- user
- operator
- admin
example: user
type: string
maxconn:
example: 1234
type: integer
mode:
type: string
Expand All @@ -334,8 +330,10 @@ definitions:
type: string
x-nullable: false
namespace:
example: app
type: string
nice:
example: 1
type: integer
no_ca_names:
type: boolean
Expand Down Expand Up @@ -387,6 +385,7 @@ definitions:
- none
- number
- string
example: none
type: string
x-display-name: Format
ssl:
Expand Down Expand Up @@ -447,6 +446,7 @@ definitions:
- none
- optional
- required
example: none
type: string
x-dependency:
ssl:
Expand Down Expand Up @@ -867,22 +867,13 @@ definitions:
- address: 127.0.1.1
name: www_server
port: 4567
weight: 30
- address: 127.0.1.2
name: www_server_new
port: 4567
weight: 70
use_as: default
name: test_site
service:
http_connection_mode: httpclose
listeners:
- address: 127.0.0.1
name: test_listener
port: 80
- address: 127.0.0.1
name: test_listener_2
port: 8080
maxconn: 2000
mode: http
properties:
Expand Down Expand Up @@ -3304,19 +3295,23 @@ definitions:
items:
$ref: "#/definitions/http_errors_section"
bind:
additionalProperties: false
allOf:
- $ref: '#/definitions/bind_params'
description: HAProxy frontend bind configuration
properties:
address:
example: 127.0.0.1
pattern: ^[^\s]+$
type: string
port:
example: 80
maximum: 65535
minimum: 1
type: integer
x-nullable: true
port-range-end:
example: 81
maximum: 65535
minimum: 1
type: integer
Expand All @@ -3336,10 +3331,8 @@ definitions:
description: HAProxy backend server configuration
example:
address: 10.1.1.1
check: enabled
name: www
port: 8080
weight: 80
properties:
address:
pattern: ^[^\s]+$
Expand Down Expand Up @@ -4797,8 +4790,6 @@ definitions:
additionalProperties: false
description: HAProxy HTTP error rule configuration (corresponds to http-error directives)
example:
hdr_format: '%T'
hdr_name: X-Haproxy-Current-Date
index: 0
status: 425
type: status
Expand Down
4 changes: 4 additions & 0 deletions specification/models/configuration/bind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,22 @@ bind:
address:
type: string
pattern: '^[^\s]+$'
example: 127.0.0.1
port:
maximum: 65535
minimum: 1
type: integer
x-nullable: true
example: 80
port-range-end:
maximum: 65535
minimum: 1
type: integer
x-nullable: true
example: 81
allOf:
- $ref: '#/definitions/bind_params'
additionalProperties: false
default_bind:
title: Default Bind
description: HAProxy default bind configuration
Expand Down
10 changes: 6 additions & 4 deletions specification/models/configuration/bind_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,15 @@ bind_params:
level:
type: string
enum: [user, operator, admin]
example: user
severity_output:
type: string
x-display-name: Format
enum: [none, number, string]
example: none
maxconn:
type: integer
example: 1234
mode:
type: string
mss:
Expand All @@ -123,8 +126,10 @@ bind_params:
x-nullable: false
namespace:
type: string
example: app
nice:
type: integer
example: 1
no_ca_names:
type: boolean
x-dependency:
Expand Down Expand Up @@ -219,8 +224,5 @@ bind_params:
x-dependency:
ssl:
value: enabled
example: none
additionalProperties: false
example:
name: http
address: 127.0.0.1
port: 80
1 change: 0 additions & 1 deletion specification/models/configuration/fcgi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ app:
pattern: '^[^\s]+$'
x-nullable: false
description: Declares a FastCGI application
readOnly: true
docroot:
type: string
description: Defines the document root on the remote host. The parameter serves to build the default value of FastCGI parameters SCRIPT_FILENAME and PATH_TRANSLATED. It is a mandatory setting.
Expand Down
2 changes: 0 additions & 2 deletions specification/models/configuration/http/error.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,3 @@ http_error_rule:
index: 0
type: status
status: 425
hdr_name: X-Haproxy-Current-Date
hdr_format: "%T"
3 changes: 1 addition & 2 deletions specification/models/configuration/program.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ program:
type: string
pattern: '^[A-Za-z0-9-_.:]+$'
x-nullable: false
readOnly: true
command:
type: string
description: The command to be run, with flags and options.
Expand All @@ -30,4 +29,4 @@ program:
command: spoa-mirror --runtime 0 --mirror-url http://test.local
user: myusername
group: mygroupname
start-on-reload: enabled
start-on-reload: enabled
2 changes: 0 additions & 2 deletions specification/models/configuration/server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ server:
name: www
address: 10.1.1.1
port: 8080
check: enabled
weight: 80
server_template:
title: Server template
description: Set a template to initialize servers with shared parameters.
Expand Down

0 comments on commit 6832951

Please sign in to comment.