-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update README.md with giving information of Java SDK generation
- Loading branch information
Showing
3 changed files
with
24 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,35 @@ | ||
# OpsGenie Client SDK Swagger | ||
# OpsGenie OpenAPI Specification | ||
|
||
### Generate a single json from separated yaml's. | ||
This project based on [Swagger version 2.0.0](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md) and [RESTful API of OpsGenie](https://docs.opsgenie.com/docs/alert-api). | ||
|
||
--- | ||
|
||
### How To Combine YAML Files To Single JSON | ||
Prerequisites | ||
- Node.js with npm (https://nodejs.org/en/download/) | ||
- [Node.js](https://nodejs.org/en/download/) with npm | ||
|
||
You need to install the node dependencies once. | ||
```bash | ||
cd multi-file-swagger | ||
cd $PROJECT_ROOT/multi-file-swagger | ||
npm install | ||
``` | ||
|
||
Now you can generate the single swagger json file. | ||
```bash | ||
cd $PROJECT_ROOT | ||
node ./multi-file-swagger/index.js -- swagger.yaml > swagger.json | ||
``` | ||
|
||
--- | ||
|
||
### How To Generate Swagger Classes (for Java) | ||
At this stage, we are using __our swagger-codegen__ implementation and use special params like x-collapse-params. However, you can also use default [swagger-codegen](https://github.com/swagger-api/swagger-codegen) during the Java SDK generation. | ||
|
||
```bash | ||
cd $PROJECT_ROOT | ||
mvn clean install | ||
cd ./target/generated-sources/java | ||
mvn install | ||
``` | ||
|
||
For configuration of pom.xml, you can refer [here](https://github.com/swagger-api/swagger-codegen/tree/master/modules/swagger-codegen-maven-plugin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters