Skip to content

Commit 0cdf122

Browse files
committed
DOC: Add Contributing Guide
1 parent cf63726 commit 0cdf122

File tree

2 files changed

+55
-40
lines changed

2 files changed

+55
-40
lines changed

CONTRIBUTING.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# ![HAProxy](assets/images/haproxy-weblogo-210x49.png "HAProxy")
2+
3+
## Contributing guide
4+
5+
This document is a short guide for contributing to this project.
6+
7+
## API Specification - Development guide
8+
9+
Data Plane API is generated using [go-swagger](https://github.com/go-swagger/go-swagger) from the swagger spec found [here](https://github.com/haproxytech/dataplaneapi-specification/blob/master/build/haproxy_spec.yaml) using the following command.
10+
11+
```
12+
./swagger generate server -f haproxy_spec.yaml \
13+
-A "Data Plane" \
14+
-t $GOPATH/src/github.com/haproxytech/ \
15+
--existing-models github.com/haproxytech/models \
16+
--exclude-main \
17+
--skip-models \
18+
-s dataplaneapi \
19+
--tags=Discovery \
20+
--tags=Information \
21+
--tags=Specification \
22+
--tags=Transactions \
23+
--tags=Sites \
24+
--tags=Stats \
25+
--tags=Global \
26+
--tags=Frontend \
27+
--tags=Backend \
28+
--tags=Bind \
29+
--tags=Server \
30+
--tags=Configuration \
31+
--tags=HTTPRequestRule \
32+
--tags=HTTPResponseRule \
33+
--tags=BackendSwitchingRule \
34+
--tags=ServerSwitchingRule \
35+
--tags=TCPResponseRule \
36+
--tags=TCPRequestRule \
37+
--tags=Filter \
38+
--tags=StickRule \
39+
--tags=LogTarget \
40+
--tags=Reloads \
41+
--tags=ACL \
42+
--tags=Defaults
43+
```
44+
45+
This command generates some of the files in this project, which are marked with // Code generated by go-swagger; DO NOT EDIT.
46+
comments at the top of the files. These are not to be edited, as they are overwritten when specification is changed and the above-mentioned command is run. If you want to change those files, please change the specification where neccessary and then generate them again.
47+
48+
## Commit Messages and General Style
49+
50+
For commit messages and general style please follow the haproxy project's [CONTRIBUTING guide](https://github.com/haproxy/haproxy/blob/master/CONTRIBUTING) and use that where applicable.

README.md

Lines changed: 5 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,45 +4,6 @@
44

55
**Data Plane API** is a sidecar process that runs next to HAProxy and provides API endpoints for managing HAProxy. It requires HAProxy version 1.9.0 or higher.
66

7-
## API Specification - Development guide
8-
9-
Data Plane API is generated using [go-swagger](https://github.com/go-swagger/go-swagger) from the swagger spec found [here](https://github.com/haproxytech/dataplaneapi-specification/blob/master/build/haproxy_spec.yaml) using the following command.
10-
11-
```
12-
./swagger generate server -f haproxy_spec.yaml \
13-
-A "Data Plane" \
14-
-t $GOPATH/src/github.com/haproxytech/ \
15-
--existing-models github.com/haproxytech/models \
16-
--exclude-main \
17-
--skip-models \
18-
-s dataplaneapi \
19-
--tags=Discovery \
20-
--tags=Information \
21-
--tags=Specification \
22-
--tags=Transactions \
23-
--tags=Sites \
24-
--tags=Stats \
25-
--tags=Global \
26-
--tags=Frontend \
27-
--tags=Backend \
28-
--tags=Bind \
29-
--tags=Server \
30-
--tags=Configuration \
31-
--tags=HTTPRequestRule \
32-
--tags=HTTPResponseRule \
33-
--tags=BackendSwitchingRule \
34-
--tags=ServerSwitchingRule \
35-
--tags=TCPResponseRule \
36-
--tags=TCPRequestRule \
37-
--tags=Filter \
38-
--tags=StickRule \
39-
--tags=LogTarget \
40-
--tags=Reloads \
41-
--tags=ACL \
42-
--tags=Defaults
43-
```
44-
45-
This command generates some of the files in this project, which are marked with //DO NOT EDIT comments at the top of the files. These are not to be edited, as they are overwritten when specification is changed and the above-mentioned command is run. If you want to change those files, please change the specification and then generate them again.
467

478
## Dependencies
489

@@ -151,4 +112,8 @@ Test it out with curl, note that you need user/pass combination setup in HAProxy
151112
curl -u <user>:<pass> -H "Content-Type: application/json" "http://127.0.0.1:5555/v1/"
152113
```
153114

154-
If you are using secure passwords, supported algorithms are: md5, sha-256 and sha-512.
115+
If you are using secure passwords, supported algorithms are: md5, sha-256 and sha-512.
116+
117+
## Contributing
118+
119+
If you wish to contribute to this project please check [Contributing Guide](CONTRIBUTING.md)

0 commit comments

Comments
 (0)