You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+18-3Lines changed: 18 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,13 +7,17 @@ The API handlers are created using a YAML definition located in `swagger.YAML`.
7
7
To add new api, the YAML file needs to be updated with all the desired apis using the [Swagger Basic Structure](https://swagger.io/docs/specification/2-0/basic-structure/), this includes paths, parameters, definitions, tags, etc.
8
8
9
9
## Generate server from YAML
10
+
10
11
Once the YAML file is ready we can autogenerate the code needed for the new api by just running:
11
12
12
13
Validate it:
14
+
13
15
```
14
16
swagger validate ./swagger.yml
15
17
```
18
+
16
19
Update server code:
20
+
17
21
```
18
22
make swagger-gen
19
23
```
@@ -23,37 +27,48 @@ This will update all the necessary code.
23
27
`./restapi/configure_console.go` is a file that contains the handlers to be used by the application, here is the only place where we need to update our code to support the new apis. This file is not affected when running the swagger generator and it is safe to edit.
24
28
25
29
## Unit Tests
30
+
26
31
`./restapi/handlers_test.go` needs to be updated with the proper tests for the new api.
27
32
28
33
To run tests:
34
+
29
35
```
30
36
go test ./restapi
31
37
```
32
38
33
39
## Commit changes
40
+
34
41
After verification, commit your changes. This is a [great post](https://chris.beams.io/posts/git-commit/) on how to write useful commit messages
35
42
36
43
```
37
44
$ git commit -am 'Add some feature'
38
45
```
39
46
40
47
### Push to the branch
48
+
41
49
Push your locally committed changes to the remote origin (your fork)
50
+
42
51
```
43
52
$ git push origin my-new-feature
44
53
```
45
54
46
55
### Create a Pull Request
56
+
47
57
Pull requests can be created via GitHub. Refer to [this document](https://help.github.com/articles/creating-a-pull-request/) for detailed steps on how to create a pull request. After a Pull Request gets peer reviewed and approved, it will be merged.
48
58
49
59
## FAQs
50
-
### How does ``console`` manages dependencies?
51
-
``MinIO`` uses `go mod` to manage its dependencies.
60
+
61
+
### How does `console` manages dependencies?
62
+
63
+
`MinIO` uses `go mod` to manage its dependencies.
64
+
52
65
- Run `go get foo/bar` in the source folder to add the dependency to `go.mod` file.
53
66
54
67
To remove a dependency
68
+
55
69
- Edit your code and remove the import reference.
56
70
- Run `go mod tidy` in the source folder to remove dependency from `go.mod` file.
57
71
58
72
### What are the coding guidelines for console?
59
-
``console`` is fully conformant with Golang style. Refer: [Effective Go](https://github.com/golang/go/wiki/CodeReviewComments) article from Golang project. If you observe offending code, please feel free to send a pull request or ping us on [Slack](https://slack.min.io).
73
+
74
+
`console` is fully conformant with Golang style. Refer: [Effective Go](https://github.com/golang/go/wiki/CodeReviewComments) article from Golang project. If you observe offending code, please feel free to send a pull request or ping us on [Slack](https://slack.min.io).
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc -->
12
+
12
13
**Table of Contents**
13
14
14
15
-[MinIO Console](#minio-console)
15
-
-[Install](#install)
16
-
- [Binary Releases](#binary-releases)
17
-
- [Docker](#docker)
18
-
- [Build from source](#build-from-source)
19
-
-[Setup](#setup)
20
-
-[1. Create a user `console` using `mc`](#1-create-a-user-console-using-mc)
21
-
-[2. Create a policy for `console` with admin access to all resources (for testing)](#2-create-a-policy-for-console-with-admin-access-to-all-resources-for-testing)
22
-
-[3. Set the policy for the new `console` user](#3-set-the-policy-for-the-new-console-user)
23
-
-[Start Console service:](#start-console-service)
24
-
-[Start Console service with TLS:](#start-console-service-with-tls)
25
-
-[Connect Console to a Minio using TLS and a self-signed certificate](#connect-console-to-a-minio-using-tls-and-a-self-signed-certificate)
16
+
-[Install](#install)
17
+
-[Binary Releases](#binary-releases)
18
+
-[Docker](#docker)
19
+
-[Build from source](#build-from-source)
20
+
-[Setup](#setup)
21
+
-[1. Create a user `console` using `mc`](#1-create-a-user-console-using-mc)
22
+
-[2. Create a policy for `console` with admin access to all resources (for testing)](#2-create-a-policy-for-console-with-admin-access-to-all-resources-for-testing)
23
+
-[3. Set the policy for the new `console` user](#3-set-the-policy-for-the-new-console-user)
24
+
-[Start Console service:](#start-console-service)
25
+
-[Start Console service with TLS:](#start-console-service-with-tls)
26
+
-[Connect Console to a Minio using TLS and a self-signed certificate](#connect-console-to-a-minio-using-tls-and-a-self-signed-certificate)
26
27
-[Contribute to console Project](#contribute-to-console-project)
27
28
28
29
<!-- markdown-toc end -->
@@ -31,23 +32,25 @@ A graphical user interface for [MinIO](https://github.com/minio/minio)
| Windows | amd64|[windows-amd64](https://github.com/minio/console/releases/latest/download/console-windows-amd64.exe)|
42
43
43
44
You can also verify the binary with [minisign](https://jedisct1.github.io/minisign/) by downloading the corresponding [`.minisig`](https://github.com/minio/console/releases/latest) signature file. Then run:
0 commit comments