forked from loafle/openapi-generator-original
Fix typo in javascript generator template (#3249)
* Fix typo in javascript generator template * Update sample client
This commit is contained in:
committed by
William Cheng
parent
3e5e82460f
commit
1730a4efce
@@ -14,8 +14,7 @@ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-g
|
||||
|
||||
#### npm
|
||||
|
||||
To publish the library as a [npm](https://www.npmjs.com/),
|
||||
please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages).
|
||||
To publish the library as a [npm](https://www.npmjs.com/), please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages).
|
||||
|
||||
Then install it via:
|
||||
|
||||
@@ -23,10 +22,41 @@ Then install it via:
|
||||
npm install open_api_petstore --save
|
||||
```
|
||||
|
||||
Finally, you need to build the module:
|
||||
|
||||
```shell
|
||||
npm run build
|
||||
```
|
||||
|
||||
##### Local development
|
||||
|
||||
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing `package.json` (and this README). Let's call this `JAVASCRIPT_CLIENT_DIR`. Then run:
|
||||
|
||||
```shell
|
||||
npm install
|
||||
```
|
||||
|
||||
Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`:
|
||||
|
||||
```shell
|
||||
npm link
|
||||
```
|
||||
|
||||
To use the link you just defined in your project, switch to the directory you want to use your open_api_petstore from, and run:
|
||||
|
||||
```shell
|
||||
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
|
||||
```
|
||||
|
||||
Finally, you need to build the module:
|
||||
|
||||
```shell
|
||||
npm run build
|
||||
```
|
||||
|
||||
#### git
|
||||
#
|
||||
If the library is hosted at a git repository, e.g.
|
||||
https://github.com/GIT_USER_ID/GIT_REPO_ID
|
||||
|
||||
If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID
|
||||
then install it via:
|
||||
|
||||
```shell
|
||||
@@ -139,10 +169,12 @@ Class | Method | HTTP request | Description
|
||||
- [OpenApiPetstore.ArrayTest](docs/ArrayTest.md)
|
||||
- [OpenApiPetstore.Capitalization](docs/Capitalization.md)
|
||||
- [OpenApiPetstore.Cat](docs/Cat.md)
|
||||
- [OpenApiPetstore.CatAllOf](docs/CatAllOf.md)
|
||||
- [OpenApiPetstore.Category](docs/Category.md)
|
||||
- [OpenApiPetstore.ClassModel](docs/ClassModel.md)
|
||||
- [OpenApiPetstore.Client](docs/Client.md)
|
||||
- [OpenApiPetstore.Dog](docs/Dog.md)
|
||||
- [OpenApiPetstore.DogAllOf](docs/DogAllOf.md)
|
||||
- [OpenApiPetstore.EnumArrays](docs/EnumArrays.md)
|
||||
- [OpenApiPetstore.EnumClass](docs/EnumClass.md)
|
||||
- [OpenApiPetstore.EnumTest](docs/EnumTest.md)
|
||||
@@ -165,6 +197,7 @@ Class | Method | HTTP request | Description
|
||||
- [OpenApiPetstore.Model200Response](docs/Model200Response.md)
|
||||
- [OpenApiPetstore.ModelReturn](docs/ModelReturn.md)
|
||||
- [OpenApiPetstore.Name](docs/Name.md)
|
||||
- [OpenApiPetstore.NullableClass](docs/NullableClass.md)
|
||||
- [OpenApiPetstore.NumberOnly](docs/NumberOnly.md)
|
||||
- [OpenApiPetstore.Order](docs/Order.md)
|
||||
- [OpenApiPetstore.OuterComposite](docs/OuterComposite.md)
|
||||
@@ -182,32 +215,40 @@ Class | Method | HTTP request | Description
|
||||
## Documentation for Authorization
|
||||
|
||||
|
||||
|
||||
### api_key
|
||||
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: api_key
|
||||
- **Location**: HTTP header
|
||||
|
||||
|
||||
|
||||
### api_key_query
|
||||
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: api_key_query
|
||||
- **Location**: URL query string
|
||||
|
||||
|
||||
|
||||
### bearer_test
|
||||
|
||||
- **Type**: Bearer authentication (JWT)
|
||||
|
||||
|
||||
|
||||
### http_basic_test
|
||||
|
||||
- **Type**: HTTP basic authentication
|
||||
|
||||
|
||||
|
||||
### petstore_auth
|
||||
|
||||
|
||||
- **Type**: OAuth
|
||||
- **Flow**: implicit
|
||||
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||
|
||||
Reference in New Issue
Block a user