Skip to content

Commit

Permalink
Merge pull request #5 from gotchazipc/master
Browse files Browse the repository at this point in the history
version up to 0.3.0
  • Loading branch information
gotchazipc authored Jul 8, 2016
2 parents 4930e29 + 916c7e7 commit 51864cb
Show file tree
Hide file tree
Showing 55 changed files with 437 additions and 290 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ node_modules/

# code generator should be installed manually
builder/swagger-codegen*.jar

swagger-editor
6 changes: 3 additions & 3 deletions README-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

This SDK Contains automatically generated sources & documents with the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: 0.2.0
- Package version: 0.2.0
- Build date: 2016-07-07T17:22:13.863+09:00
- API version: 0.3.0
- Package version: 0.3.0
- Build date: 2016-07-08T19:23:08.500+09:00
- Build package: class io.swagger.codegen.languages.JavascriptClientCodegen

## Getting Started
Expand Down
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ This project contains

### For Webida server & node.js env.

Since server has a dependency to webida-resftul-api package already, server developers may not need to install npm package manually. To use client in other project,
Since server has a dependency to webida-resftul-api package already, server developers may not need to install npm package manually. To use client library in other node.js project, just install npm package from public npmjs registry.

``` shell
npm install webida-restful-api
```
Expand All @@ -23,13 +24,14 @@ In the case of electron, using node modules in any webida client code is not rec

## For contributors

If you found any bugs/problems in api spec, fill free to report. To extend features, pile an issue and begin discussion. All contributions for builder script & templates are always welcome. Please, read sections below to change spec & generate client codes.
If you found any bugs/problems in api spec, fill free to report. To extend features, pile an issue and begin discussion. All contributions for builder script & templates are always welcome. Please, read sections below to change spec & generate client codes and do not include 'generated stuffs' in PR.


## Build for your own

If you're building webida-based product or service, you may want to customize api spec & regenerate client sources & docs.


### Pre-requisites

#### node.js
Expand All @@ -54,9 +56,12 @@ For Windows, use bash from git-for-windows binary to run build.sh

### Editing swagger spec & templates

Use any editor for swagger.yaml file. We recommend you to use swagger editor. Be sure that swagger.yaml is validated before building. Or, code generator will produce very weird errors, hard to find why & where.
We recommend you to use swagger-editor[swagger-editor](https://github.com/swagger-api/swagger-editor) to edit swagger file & on-the-fly validation. Always be sure that swagger.yaml is validated before building. Or, swagger-codegen-cli will produce very weird errors, hard to find why & where. Do not edit swagger.json file directly, for it's generated from yaml file by build.sh. You may need to add some host, port information in api spec for on-the-fly testing with editor UI, but it's not recommended to publish your spec with 'fixed' api endpoint url, in the view point of devops.

To change package.json generated, edit template files, especially package.mustache. You also need to change
build.sh to set codegen configurations. Since current template has some fixes on several issues, starting
from the code generated by official templates will be helpful to make your own templates.

Don't forget to change title & description in spec file to avoid collision from other products or services born from same spec. You may have to edit template files, especially package.mustache to change package information built. You should change build.sh to include proper options related to package name and version.

### Building sources & docs

Expand Down
4 changes: 2 additions & 2 deletions api-bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api-bundle.js.map

Large diffs are not rendered by default.

143 changes: 76 additions & 67 deletions api-spec/swagger.json

Large diffs are not rendered by default.

Loading

0 comments on commit 51864cb

Please sign in to comment.