Skip to content

Commit

Permalink
Fix typo in javascript generator template (#3249)
Browse files Browse the repository at this point in the history
* Fix typo in javascript generator template

* Update sample client
  • Loading branch information
petoem authored and wing328 committed Jun 30, 2019
1 parent 3e5e824 commit 1730a4e
Show file tree
Hide file tree
Showing 119 changed files with 1,082 additions and 249 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Then install it via:
npm install {{{projectName}}} --save
```

Finaly, you need to build the module:
Finally, you need to build the module:

```shell
npm run build
Expand All @@ -56,7 +56,7 @@ To use the link you just defined in your project, switch to the directory you wa
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
```

Finaly, you need to build the module:
Finally, you need to build the module:

```shell
npm run build
Expand Down
4 changes: 2 additions & 2 deletions samples/client/petstore/javascript-es6/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Then install it via:
npm install open_api_petstore --save
```

Finaly, you need to build the module:
Finally, you need to build the module:

```shell
npm run build
Expand All @@ -48,7 +48,7 @@ To use the link you just defined in your project, switch to the directory you wa
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
```

Finaly, you need to build the module:
Finally, you need to build the module:

```shell
npm run build
Expand Down
4 changes: 2 additions & 2 deletions samples/client/petstore/javascript-promise-es6/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Then install it via:
npm install open_api_petstore --save
```

Finaly, you need to build the module:
Finally, you need to build the module:

```shell
npm run build
Expand All @@ -48,7 +48,7 @@ To use the link you just defined in your project, switch to the directory you wa
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
```

Finaly, you need to build the module:
Finally, you need to build the module:

```shell
npm run build
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0.0-SNAPSHOT
4.0.3-SNAPSHOT
4 changes: 1 addition & 3 deletions samples/openapi3/client/petstore/javascript-es6/.travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
language: node_js
cache: npm
node_js:
- "6"
- "6.1"
- "5"
- "5.11"

51 changes: 46 additions & 5 deletions samples/openapi3/client/petstore/javascript-es6/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,49 @@ 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:

```shell
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
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# OpenApiPetstore.AdditionalPropertiesClass

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**mapProperty** | **{String: String}** | | [optional]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# OpenApiPetstore.Animal

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**className** | **String** | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@ Method | HTTP request | Description
[**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags


<a name="call123testSpecialTags"></a>
# **call123testSpecialTags**

## call123testSpecialTags

> Client call123testSpecialTags(client)
To test special tags

To test special tags and operation ID starting with number

### Example

```javascript
import OpenApiPetstore from 'open_api_petstore';

Expand All @@ -32,6 +34,7 @@ apiInstance.call123testSpecialTags(client, (error, data, response) => {

### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**client** | [**Client**](Client.md)| client model |
Expand All @@ -46,6 +49,6 @@ No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json
- **Content-Type**: application/json
- **Accept**: application/json

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# OpenApiPetstore.ApiResponse

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **Number** | | [optional]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# OpenApiPetstore.ArrayOfArrayOfNumberOnly

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**arrayArrayNumber** | **[[Number]]** | | [optional]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# OpenApiPetstore.ArrayOfNumberOnly

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**arrayNumber** | **[Number]** | | [optional]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# OpenApiPetstore.ArrayTest

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**arrayOfString** | **[String]** | | [optional]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# OpenApiPetstore.Capitalization

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**smallCamel** | **String** | | [optional]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# OpenApiPetstore.Cat

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**declawed** | **Boolean** | | [optional]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# OpenApiPetstore.CatAllOf

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**declawed** | **Boolean** | | [optional]


Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# OpenApiPetstore.Category

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **Number** | | [optional]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# OpenApiPetstore.ClassModel

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**_class** | **String** | | [optional]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# OpenApiPetstore.Client

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**client** | **String** | | [optional]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ Method | HTTP request | Description
[**fooGet**](DefaultApi.md#fooGet) | **GET** /foo |


<a name="fooGet"></a>
# **fooGet**

## fooGet

> InlineResponseDefault fooGet()


### Example

```javascript
import OpenApiPetstore from 'open_api_petstore';

Expand All @@ -28,6 +30,7 @@ apiInstance.fooGet((error, data, response) => {
```

### Parameters

This endpoint does not need any parameter.

### Return type
Expand All @@ -40,6 +43,6 @@ No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json
- **Content-Type**: Not defined
- **Accept**: application/json

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# OpenApiPetstore.Dog

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**breed** | **String** | | [optional]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# OpenApiPetstore.DogAllOf

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**breed** | **String** | | [optional]


Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# OpenApiPetstore.EnumArrays

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**justSymbol** | **String** | | [optional]
**arrayEnum** | **[String]** | | [optional]


<a name="JustSymbolEnum"></a>

## Enum: JustSymbolEnum


Expand All @@ -18,7 +19,7 @@ Name | Type | Description | Notes



<a name="[ArrayEnumEnum]"></a>

## Enum: [ArrayEnumEnum]


Expand Down
Loading

0 comments on commit 1730a4e

Please sign in to comment.