mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-12 20:50:55 +00:00
Fixes in GitHub templates files (#311)
This commit is contained in:
parent
8edf6e52ad
commit
e9793783cd
2
.github/ISSUE_TEMPLATE.md
vendored
2
.github/ISSUE_TEMPLATE.md
vendored
@ -37,7 +37,7 @@ link it here.
|
|||||||
|
|
||||||
##### Related issues/PRs
|
##### Related issues/PRs
|
||||||
|
|
||||||
<!-- has a similar issue/PR been reported/opened before? Please do a search in https://github.com/wing328/openapi-generator/issues?utf8=%E2%9C%93&q=is%3Aissue%20 -->
|
<!-- has a similar issue/PR been reported/opened before? Please do a search in https://github.com/openapitools/openapi-generator/issues?utf8=%E2%9C%93&q=is%3Aissue%20 -->
|
||||||
|
|
||||||
##### Suggest a fix/enhancement
|
##### Suggest a fix/enhancement
|
||||||
|
|
||||||
|
6
.github/PULL_REQUEST_TEMPLATE.md
vendored
6
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -1,9 +1,9 @@
|
|||||||
### PR checklist
|
### PR checklist
|
||||||
|
|
||||||
- [ ] Read the [contribution guidelines](https://github.com/wing328/openapi-generator/blob/master/CONTRIBUTING.md).
|
- [ ] Read the [contribution guidelines](https://github.com/openapitools/openapi-generator/blob/master/CONTRIBUTING.md).
|
||||||
- [ ] Ran the shell script under `./bin/` to update Petstore sample so that CIs can verify the change. (For instance, only need to run `./bin/{LANG}-petstore.sh` and `./bin/security/{LANG}-petstore.sh` if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in `.\bin\windows\`.
|
- [ ] Ran the shell script under `./bin/` to update Petstore sample so that CIs can verify the change. (For instance, only need to run `./bin/{LANG}-petstore.sh` and `./bin/security/{LANG}-petstore.sh` if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in `.\bin\windows\`.
|
||||||
- [ ] Filed the PR against the correct branch: `3.0.0` branch for changes related to OpenAPI spec 3.0. Default: `master`.
|
- [ ] Filed the PR against the correct branch: Default: `master`.
|
||||||
- [ ] Copied the [technical committee](https://github.com/wing328/openapi-generator/#swagger-codegen-technical-committee) to review the pull request if your PR is targeting a particular programming language.
|
- [ ] Copied the [technical committee](https://github.com/openapitools/openapi-generator/#swagger-codegen-technical-committee) to review the pull request if your PR is targeting a particular programming language.
|
||||||
|
|
||||||
### Description of the PR
|
### Description of the PR
|
||||||
|
|
||||||
|
@ -2,16 +2,16 @@
|
|||||||
|
|
||||||
## Before submitting an issue
|
## Before submitting an issue
|
||||||
|
|
||||||
- If you're not using the latest master to generate API clients or server stubs, please give it another try by pulling the latest master as the issue may have already been addressed. Ref: [Getting Started](https://github.com/swagger-api/swagger-codegen#getting-started)
|
- If you're not using the latest master to generate API clients or server stubs, please give it another try by pulling the latest master as the issue may have already been addressed. Ref: [Getting Started](https://github.com/openapitools/openapi-generator#getting-started)
|
||||||
- Search the [open issue](https://github.com/swagger-api/swagger-codegen/issues) and [closed issue](https://github.com/swagger-api/swagger-codegen/issues?q=is%3Aissue+is%3Aclosed) to ensure no one else has reported something similar before.
|
- Search the [open issue](https://github.com/openapitools/openapi-generator/issues) and [closed issue](https://github.com/openapitools/openapi-generator/issues?q=is%3Aissue+is%3Aclosed) to ensure no one else has reported something similar before.
|
||||||
- File an [issue ticket](https://github.com/swagger-api/swagger-codegen/issues/new) by providing all the required information.
|
- File an [issue ticket](https://github.com/openapitools/openapi-generator/issues/new) by providing all the required information.
|
||||||
- Test with the latest master by building the JAR locally to see if the issue has already been addressed.
|
- Test with the latest master by building the JAR locally to see if the issue has already been addressed.
|
||||||
- You can also make a suggestion or ask a question by opening an "issue".
|
- You can also make a suggestion or ask a question by opening an "issue".
|
||||||
|
|
||||||
## Before submitting a PR
|
## Before submitting a PR
|
||||||
|
|
||||||
- Search the [open issue](https://github.com/swagger-api/swagger-codegen/issues) to ensure no one else has reported something similar and no one is actively working on similar proposed change.
|
- Search the [open issue](https://github.com/openapitools/openapi-generator/issues) to ensure no one else has reported something similar and no one is actively working on similar proposed change.
|
||||||
- If no one has suggested something similar, open an ["issue"](https://github.com/swagger-api/swagger-codegen/issues) with your suggestion to gather feedback from the community.
|
- If no one has suggested something similar, open an ["issue"](https://github.com/openapitools/openapi-generator/issues) with your suggestion to gather feedback from the community.
|
||||||
- It's recommended to **create a new git branch** for the change so that the merge commit message looks nicer in the commit history.
|
- It's recommended to **create a new git branch** for the change so that the merge commit message looks nicer in the commit history.
|
||||||
|
|
||||||
## How to contribute
|
## How to contribute
|
||||||
@ -20,17 +20,17 @@
|
|||||||
|
|
||||||
If you're new to git, you may find the following FAQs useful:
|
If you're new to git, you may find the following FAQs useful:
|
||||||
|
|
||||||
https://github.com/swagger-api/swagger-codegen/wiki/FAQ#git
|
https://github.com/openapitools/openapi-generator/wiki/FAQ#git
|
||||||
|
|
||||||
### Code generators
|
### Code generators
|
||||||
|
|
||||||
All the code generators can be found in [modules/swagger-codegen/src/main/java/io/swagger/codegen/languages](https://github.com/swagger-api/swagger-codegen/tree/master/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages)
|
All the code generators can be found in [modules/swagger-codegen/src/main/java/io/swagger/codegen/languages](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages)
|
||||||
|
|
||||||
### Templates
|
### Templates
|
||||||
|
|
||||||
All the templates ([mustache](https://mustache.github.io/)) can be found in [modules/swagger-codegen/src/main/resources](https://github.com/swagger-api/swagger-codegen/tree/master/modules/swagger-codegen/src/main/resources).
|
All the templates ([mustache](https://mustache.github.io/)) can be found in [modules/swagger-codegen/src/main/resources](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/main/resources).
|
||||||
|
|
||||||
For a list of variables available in the template, please refer to this [page](https://github.com/swagger-api/swagger-codegen/wiki/Mustache-Template-Variables)
|
For a list of variables available in the template, please refer to this [page](https://github.com/openapitools/openapi-generator/wiki/Mustache-Template-Variables)
|
||||||
|
|
||||||
|
|
||||||
### Style guide
|
### Style guide
|
||||||
@ -71,14 +71,14 @@ You may find the current code base not 100% conform to the coding style and we w
|
|||||||
For [Vendor Extensions](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#vendorExtensions), please follow the naming convention below:
|
For [Vendor Extensions](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#vendorExtensions), please follow the naming convention below:
|
||||||
- For general vendor extension, use lower case and hyphen. e.g. `x-is-unique`, `x-content-type`
|
- For general vendor extension, use lower case and hyphen. e.g. `x-is-unique`, `x-content-type`
|
||||||
- For language-specified vendor extension, put it in the form of `x-{lang}-{extension-name}`. e.g. `x-objc-operation-id`, `x-java-feign-retry-limit`
|
- For language-specified vendor extension, put it in the form of `x-{lang}-{extension-name}`. e.g. `x-objc-operation-id`, `x-java-feign-retry-limit`
|
||||||
- For a list of existing vendor extensions in use, please refer to https://github.com/swagger-api/swagger-codegen/wiki/Vendor-Extensions. If you've added new vendor extensions as part of your PR, please update the wiki page.
|
- For a list of existing vendor extensions in use, please refer to https://github.com/openapitools/openapi-generator/wiki/Vendor-Extensions. If you've added new vendor extensions as part of your PR, please update the wiki page.
|
||||||
|
|
||||||
### Testing
|
### Testing
|
||||||
|
|
||||||
To add test cases (optional) covering the change in the code generator, please refer to [modules/swagger-codegen/src/test/java/io/swagger/codegen](https://github.com/swagger-api/swagger-codegen/tree/master/modules/swagger-codegen/src/test/java/io/swagger/codegen)
|
To add test cases (optional) covering the change in the code generator, please refer to [modules/swagger-codegen/src/test/java/io/swagger/codegen](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/test/java/org/openapitools/codegen)
|
||||||
|
|
||||||
To test the templates, please perform the following:
|
To test the templates, please perform the following:
|
||||||
- Update the [Petstore](http://petstore.swagger.io/) sample by running the shell script under `bin` folder. For example, run `./bin/ruby-petstore.sh` to update the Ruby PetStore API client under [`samples/client/petstore/ruby`](https://github.com/swagger-api/swagger-codegen/tree/master/samples/client/petstore/ruby) For Windows, the batch files can be found under `bin\windows` folder. (If you find that there are new files generated or unexpected changes as a result of the update, that's not unusual as the test cases are added to the OpenAPI/Swagger spec from time to time. If you've questions or concerns, please open a ticket to start a discussion)
|
- Update the [Petstore](http://petstore.swagger.io/) sample by running the shell script under `bin` folder. For example, run `./bin/ruby-petstore.sh` to update the Ruby PetStore API client under [`samples/client/petstore/ruby`](https://github.com/openapitools/openapi-generator/tree/master/samples/client/petstore/ruby) For Windows, the batch files can be found under `bin\windows` folder. (If you find that there are new files generated or unexpected changes as a result of the update, that's not unusual as the test cases are added to the OpenAPI/Swagger spec from time to time. If you've questions or concerns, please open a ticket to start a discussion)
|
||||||
- Run the tests in the sample folder, e.g. in `samples/client/petstore/ruby`, run `mvn integration-test -rf :RubyPetstoreClientTests`. (some languages may not contain unit testing for Petstore and we're looking for contribution from the community to implement those tests)
|
- Run the tests in the sample folder, e.g. in `samples/client/petstore/ruby`, run `mvn integration-test -rf :RubyPetstoreClientTests`. (some languages may not contain unit testing for Petstore and we're looking for contribution from the community to implement those tests)
|
||||||
- Finally, git commit the updated samples files: `git commit -a`
|
- Finally, git commit the updated samples files: `git commit -a`
|
||||||
(`git add -A` if added files with new test cases)
|
(`git add -A` if added files with new test cases)
|
||||||
@ -91,7 +91,7 @@ To start the CI tests, you can run `mvn verify -Psamples` (assuming you've all t
|
|||||||
- Add test case(s) to cover the change
|
- Add test case(s) to cover the change
|
||||||
- Document the fix in the code to make the code more readable
|
- Document the fix in the code to make the code more readable
|
||||||
- Make sure test cases passed after the change (one way is to leverage https://travis-ci.org/ to run the CI tests)
|
- Make sure test cases passed after the change (one way is to leverage https://travis-ci.org/ to run the CI tests)
|
||||||
- File a PR with meaningful title, description and commit messages. A good example is [PR-3306](https://github.com/swagger-api/swagger-codegen/pull/3306)
|
- File a PR with meaningful title, description and commit messages.
|
||||||
- Recommended git settings
|
- Recommended git settings
|
||||||
- `git config --global core.autocrlf input` to tell Git convert CRLF to LF on commit but not the other way around
|
- `git config --global core.autocrlf input` to tell Git convert CRLF to LF on commit but not the other way around
|
||||||
- To close an issue (e.g. issue 1542) automatically after a PR is merged, use keywords "fix", "close", "resolve" in the PR description, e.g. `fix #1542`. (Ref: [closing issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/))
|
- To close an issue (e.g. issue 1542) automatically after a PR is merged, use keywords "fix", "close", "resolve" in the PR description, e.g. `fix #1542`. (Ref: [closing issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user