[JavaScript] add oneOf support (#13561)

* JS add oneOf support

* add validate json method

* add oneOf support to JS client

* update samples

* add todo in anyof

* switch to composed.oneOf

* update oneOf to support primitive types

* update messages

* minor fix, add more tests

* update samples

* fix npe in from model

* fix syntax error in length check

* update samples
This commit is contained in:
William Cheng
2022-10-02 13:34:50 +08:00
committed by GitHub
parent 2920c7bf91
commit 9cc23dd09d
193 changed files with 6766 additions and 4 deletions

View File

@@ -0,0 +1,10 @@
# OpenApiPetstore.BasquePig
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**className** | **String** | |
**color** | **String** | |

View File

@@ -0,0 +1,8 @@
# OpenApiPetstore.Color
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

View File

@@ -0,0 +1,10 @@
# OpenApiPetstore.DanishPig
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**className** | **String** | |
**size** | **Number** | |

View File

@@ -0,0 +1,10 @@
# OpenApiPetstore.NestedColor
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**size** | **Number** | | [optional]
**nested** | [**Color**](Color.md) | | [optional]

View File

@@ -0,0 +1,10 @@
# OpenApiPetstore.NestedOneOf
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**size** | **Number** | | [optional]
**nestedPig** | [**Pig**](Pig.md) | | [optional]

View File

@@ -0,0 +1,11 @@
# OpenApiPetstore.Pig
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**className** | **String** | |
**color** | **String** | |
**size** | **Number** | |