Compare commits

..

8 Commits

Author SHA1 Message Date
William Cheng
0e8a6ac11d test with JDK21 in github workflow 2025-10-16 19:34:46 +08:00
CG
323f978674 fix(kotlin-spring): the generated RequestHeader defaultValue for String parameters contains duplicated double quotes (#22123) 2025-10-16 18:34:33 +08:00
William Cheng
4fe1c4ac73 feat(typescript-fetch): add docs support (#22110)
* feat(typescript-fetch): add docs support

fixes #18276

* chore: regenerate

- generate-samples.sh
- export_docs_generators.sh

* chore: address PR feedback

* update samples

* update samples

* clean up unused files

---------

Co-authored-by: Aaron Heckmann <aaron@plane.so>
2025-10-16 18:21:41 +08:00
monksy
ecaf3ea48a Removed a duplicate binding for an address for rust-server (#22116)
* Removed a duplicate binding for an address for rust-server. The address binding happens higher up in the method.

* Updated samples.
2025-10-16 17:04:41 +08:00
jheyens
ce1e9e0866 Jersey2/3: Fixes a bug in OAuth token renewal, where the previous HTTP 401 code is reused even after the retry succeeds (#22134)
* Jersey2/3: Fix a bug where, when using OAuth, the HTTP 401 status code persisted even if the second request after renewing the Bearer access token succeeded

* Jersey2/3: Regenerate samples
2025-10-16 16:32:05 +08:00
Adnan
fc12a1b63a feat(rust-axum): make the Object value public (#22144)
* feat(rust-axum): make the Object value public

* feat(rust-axum): regenerate samples
2025-10-16 15:01:19 +08:00
William Cheng
bce0ea65fe CircleCI: clean up unused tests/setup (#22158)
* clean up circleci tests

* ignore .angular

* trigger build failure

* Revert "trigger build failure"

This reverts commit ee228266b1.
2025-10-16 14:50:41 +08:00
Linh Tran Tuan
117042aa44 [Rust-Axum] Fix wrong validation for non-model Body (#22155)
* Fix Issue 21143

* Update
2025-10-16 14:25:01 +08:00
379 changed files with 37674 additions and 15246 deletions

View File

@@ -16,7 +16,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: [11, 17]
java: [11, 17, 21]
os: [ubuntu-latest]
steps:
- name: Check out code

View File

@@ -16,7 +16,7 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
java: [11, 17]
java: [11, 17, 21]
steps:
- uses: actions/checkout@v5
- name: Set up JDK ${{ matrix.java }}

View File

@@ -11,43 +11,15 @@ export NODE_ENV=test
if [ "$NODE_INDEX" = "1" ]; then
echo "Running node $NODE_INDEX ..."
java -version
sudo apt-get -y install cpanminus
# install rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
echo "Testing perl"
(cd samples/client/petstore/perl && /bin/bash ./test.bash)
echo "Testing ruby"
(cd samples/client/petstore/ruby && mvn integration-test)
(cd samples/client/petstore/ruby-faraday && mvn integration-test)
(cd samples/client/petstore/ruby-httpx && mvn integration-test)
(cd samples/client/petstore/ruby-autoload && mvn integration-test)
echo "Testing rust"
(cd samples/server/petstore/rust-axum && mvn integration-test)
elif [ "$NODE_INDEX" = "2" ]; then
echo "Running node $NODE_INDEX to test Go"
# install haskell
#curl -sSLk https://get.haskellstack.org/ | sh
#stack upgrade
#stack --version
# install curl
#sudo apt-get -y build-dep libcurl4-gnutls-dev
#sudo apt-get -y install libcurl4-gnutls-dev
# Install golang version 1.18
go version
sudo mkdir /usr/local/go1.18
wget -c https://dl.google.com/go/go1.18.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local/go1.18
export PATH="/usr/local/go1.18/go/bin:$PATH"
go version
echo "Running node $NODE_INDEX to test cpp-restsdk"
# install cpprestsdk
sudo apt-get install libcpprest-dev
@@ -62,54 +34,15 @@ elif [ "$NODE_INDEX" = "3" ]; then
echo "Running node $NODE_INDEX ... "
## Install node@stable (for angular 6)
#set +e
#curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
#export NVM_DIR="/opt/circleci/.nvm"
#[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
##nvm install stable
## install v16 instead of the latest stable version
#nvm install 18
#nvm alias default 18
#node --version
## Each step uses the same `$BASH_ENV`, so need to modify it
#echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV
#echo "[ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"" >> $BASH_ENV
#(cd samples/client/others/typescript-angular && mvn integration-test)
#(cd samples/client/petstore/typescript-angular-v12-provided-in-root && mvn integration-test)
#(cd samples/client/petstore/typescript-angular-v13-provided-in-root && mvn integration-test)
#(cd samples/client/petstore/typescript-angular-v14-provided-in-root && mvn integration-test)
#(cd samples/client/petstore/typescript-angular-v15-provided-in-root && mvn integration-test)
#(cd samples/client/petstore/typescript-angular-v16-provided-in-root && mvn integration-test)
#(cd samples/client/petstore/typescript-angular-v17-provided-in-root && mvn integration-test)
#(cd samples/client/petstore/typescript-angular-v18-provided-in-root && mvn integration-test)
#(cd samples/client/petstore/typescript-angular-v19-provided-in-root && mvn integration-test)
#(cd samples/openapi3/client/petstore/typescript/builds/default && mvn integration-test)
#(cd samples/openapi3/client/petstore/typescript/tests/default && mvn integration-test)
#(cd samples/openapi3/client/petstore/typescript/builds/jquery && mvn integration-test)
#(cd samples/openapi3/client/petstore/typescript/tests/jquery && mvn integration-test)
#(cd samples/openapi3/client/petstore/typescript/builds/object_params && mvn integration-test)
#(cd samples/openapi3/client/petstore/typescript/tests/object_params && mvn integration-test)
#(cd samples/openapi3/client/petstore/typescript/builds/inversify && mvn integration-test)
#(cd samples/openapi3/client/petstore/typescript/tests/inversify && mvn integration-test)
##(cd samples/openapi3/client/petstore/typescript/tests/deno && mvn integration-test)
#(cd samples/openapi3/client/petstore/typescript/builds/browser && mvn integration-test)
#(cd samples/openapi3/client/petstore/typescript/tests/browser && mvn integration-test)
#(cd samples/openapi3/client/petstore/typescript/builds/nullable-enum && mvn integration-test)
#(cd samples/client/petstore/typescript-fetch/builds/default && mvn integration-test)
#(cd samples/client/petstore/typescript-fetch/builds/es6-target && mvn integration-test)
#(cd samples/client/petstore/typescript-fetch/builds/with-npm-version && mvn integration-test)
#(cd samples/client/petstore/typescript-fetch/tests/default && mvn integration-test)
#(cd samples/client/petstore/typescript-node/npm && mvn integration-test)
#(cd samples/client/petstore/typescript-rxjs/builds/with-npm-version && mvn integration-test)
#(cd samples/client/petstore/typescript-axios/builds/with-npm-version && mvn integration-test)
#(cd samples/client/petstore/typescript-axios/tests/default && mvn integration-test)
#(cd samples/client/petstore/typescript-axios/tests/with-complex-headers && mvn integration-test)
echo "Testing ruby"
(cd samples/client/petstore/ruby && mvn integration-test)
(cd samples/client/petstore/ruby-faraday && mvn integration-test)
(cd samples/client/petstore/ruby-httpx && mvn integration-test)
(cd samples/client/petstore/ruby-autoload && mvn integration-test)
else
echo "Running node $NODE_INDEX ..."
java -version
./mvnw clean install
fi

View File

@@ -861,6 +861,24 @@ public class RustAxumServerCodegen extends AbstractRustCodegen implements Codege
}
if (op.bodyParam != null) {
final var dataType = op.bodyParam.dataType;
if (dataType.startsWith(vecType + "<String")) {
op.bodyParam.vendorExtensions.put("is-vec-string", true);
} else if (dataType.startsWith(vecType + "<models::")) {
op.bodyParam.vendorExtensions.put("is-vec-nested", true);
} else if (dataType.startsWith(mapType + "<String, String")) {
op.bodyParam.vendorExtensions.put("is-map-string", true);
} else if (dataType.startsWith(mapType + "<String, models::")) {
op.bodyParam.vendorExtensions.put("is-map-nested", true);
} else if (dataType.startsWith(mapType + "<String")) {
op.bodyParam.vendorExtensions.put("is-map", true);
} else if (dataType.startsWith("models::")) {
op.bodyParam.isModel = true;
} else if (dataType.equals("String")) {
op.bodyParam.isString = true;
op.bodyParam.vendorExtensions.put("is-string", true);
}
if (consumesJson) {
op.bodyParam.vendorExtensions.put("x-consumes-json", true);
} else if (consumesFormUrlEncoded) {

View File

@@ -73,6 +73,8 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
protected boolean withoutRuntimeChecks = false;
protected boolean stringEnums = false;
protected String fileNaming = PASCAL_CASE;
protected String apiDocPath = "docs";
protected String modelDocPath = "docs";
// "Saga and Record" mode.
public static final String SAGAS_AND_RECORDS = "sagasAndRecords";
@@ -107,10 +109,12 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
// at the moment
importMapping.clear();
outputFolder = "generated-code/typescript-fetch";
outputFolder = "generated-code" + File.separator + "typescript-fetch";
embeddedTemplateDir = templateDir = "typescript-fetch";
this.apiTemplateFiles.put("apis.mustache", ".ts");
this.apiDocTemplateFiles.put("api_doc.mustache", ".md");
this.modelDocTemplateFiles.put("model_doc.mustache", ".md");
this.addExtraReservedWords();
@@ -138,6 +142,11 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
return convertUsingFileNamingConvention(super.toModelFilename(name));
}
@Override
public String toModelDocFilename(String name) {
return toModelName(name);
}
/**
* Converts the original name according to the current <code>fileNaming</code> strategy.
*
@@ -242,6 +251,10 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
this.apiPackage = sourceDir + "apis";
this.modelPackage = sourceDir + "models";
// make api and model doc path available in mustache template
additionalProperties.put("apiDocPath", apiDocPath);
additionalProperties.put("modelDocPath", modelDocPath);
supportingFiles.add(new SupportingFile("index.mustache", sourceDir, "index.ts"));
supportingFiles.add(new SupportingFile("runtime.mustache", sourceDir, "runtime.ts"));
@@ -316,6 +329,16 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
convertPropertyToBooleanAndWriteBack(VALIDATION_ATTRIBUTES, this::setGenerateValidationAttributes);
}
@Override
public String apiDocFileFolder() {
return (outputFolder + File.separator + apiDocPath);
}
@Override
public String modelDocFileFolder() {
return (outputFolder + File.separator + modelDocPath);
}
@Override
public String toEnumDefaultValue(String value, String datatype) {
if (this.getSagasAndRecords()) {

View File

@@ -1299,11 +1299,9 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
try {
response = sendRequest(method, invocationBuilder, entity);
final int statusCode = response.getStatusInfo().getStatusCode();
{{#hasOAuthMethods}}
// If OAuth is used and a status 401 is received, renew the access token and retry the request
if (authNames != null && statusCode == Status.UNAUTHORIZED.getStatusCode()) {
if (authNames != null && response.getStatusInfo().getStatusCode() == Status.UNAUTHORIZED.getStatusCode()) {
for (String authName : authNames) {
Authentication authentication = authentications.get(authName);
if (authentication instanceof OAuth) {
@@ -1317,8 +1315,10 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
}
}
}
{{/hasOAuthMethods}}
final int statusCode = response.getStatusInfo().getStatusCode();
Map<String, List<String>> responseHeaders = buildResponseHeaders(response);
if (statusCode == Status.NO_CONTENT.getStatusCode()) {

View File

@@ -1299,11 +1299,9 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
try {
response = sendRequest(method, invocationBuilder, entity);
final int statusCode = response.getStatusInfo().getStatusCode();
{{#hasOAuthMethods}}
// If OAuth is used and a status 401 is received, renew the access token and retry the request
if (authNames != null && statusCode == Status.UNAUTHORIZED.getStatusCode()) {
if (authNames != null && response.getStatusInfo().getStatusCode() == Status.UNAUTHORIZED.getStatusCode()) {
for (String authName : authNames) {
Authentication authentication = authentications.get(authName);
if (authentication instanceof OAuth) {
@@ -1319,6 +1317,8 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
}
{{/hasOAuthMethods}}
final int statusCode = response.getStatusInfo().getStatusCode();
Map<String, List<String>> responseHeaders = buildResponseHeaders(response);
if (statusCode == Status.NO_CONTENT.getStatusCode()) {

View File

@@ -1 +1 @@
{{#isHeaderParam}}{{#useBeanValidation}}{{>beanValidationCore}}{{/useBeanValidation}}{{#swagger2AnnotationLibrary}}@Parameter(description = "{{{description}}}", `in` = ParameterIn.HEADER{{#required}}, required = true{{/required}}{{#allowableValues}}{{#defaultValue}}, schema = Schema(allowableValues = [{{#values}}"{{{.}}}"{{^-last}}, {{/-last}}{{/values}}]{{^isContainer}}, defaultValue = {{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{/isContainer}}){{/defaultValue}}{{/allowableValues}}{{#allowableValues}}{{^defaultValue}}, schema = Schema(allowableValues = [{{#values}}"{{{.}}}"{{^-last}}, {{/-last}}{{/values}}]){{/defaultValue}}{{/allowableValues}}{{^allowableValues}}{{#defaultValue}}{{^isContainer}}, schema = Schema(defaultValue = {{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}){{/isContainer}}{{/defaultValue}}{{/allowableValues}}){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}"{{/allowableValues}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}){{/swagger1AnnotationLibrary}} @RequestHeader(value = "{{baseName}}", required = {{#required}}true{{/required}}{{^required}}false{{/required}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}) {{{paramName}}}: {{>optionalDataType}}{{/isHeaderParam}}
{{#isHeaderParam}}{{#useBeanValidation}}{{>beanValidationCore}}{{/useBeanValidation}}{{#swagger2AnnotationLibrary}}@Parameter(description = "{{{description}}}", `in` = ParameterIn.HEADER{{#required}}, required = true{{/required}}{{#allowableValues}}{{#defaultValue}}, schema = Schema(allowableValues = [{{#values}}"{{{.}}}"{{^-last}}, {{/-last}}{{/values}}]{{^isContainer}}, defaultValue = {{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{/isContainer}}){{/defaultValue}}{{/allowableValues}}{{#allowableValues}}{{^defaultValue}}, schema = Schema(allowableValues = [{{#values}}"{{{.}}}"{{^-last}}, {{/-last}}{{/values}}]){{/defaultValue}}{{/allowableValues}}{{^allowableValues}}{{#defaultValue}}{{^isContainer}}, schema = Schema(defaultValue = {{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}){{/isContainer}}{{/defaultValue}}{{/allowableValues}}){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}"{{/allowableValues}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}){{/swagger1AnnotationLibrary}} @RequestHeader(value = "{{baseName}}", required = {{#required}}true{{/required}}{{^required}}false{{/required}}{{#defaultValue}}, defaultValue = {{^isString}}"{{{.}}}"{{/isString}}{{#isString}}{{#isEnum}}"{{{.}}}"{{/isEnum}}{{^isEnum}}{{{.}}}{{/isEnum}}{{/isString}}{{/defaultValue}}) {{{paramName}}}: {{>optionalDataType}}{{/isHeaderParam}}

View File

@@ -7,6 +7,13 @@ use validator::Validate;
use crate::header;
use crate::{models, types::*};
#[allow(dead_code)]
fn from_validation_error(e: validator::ValidationError) -> validator::ValidationErrors {
let mut errs = validator::ValidationErrors::new();
errs.add("na", e);
errs
}
#[allow(dead_code)]
pub fn check_xss_string(v: &str) -> std::result::Result<(), validator::ValidationError> {
if ammonia::is_html(v) {
@@ -465,7 +472,7 @@ pub fn check_xss_map<T>(v: &std::collections::HashMap<String, T>) -> std::result
#[serde(default)]
{{/required}}
pub {{{paramName}}}: {{{dataType}}},
{{/isArray}}
{{/isArray}}
{{^isArray}}
{{#required}}
pub {{{paramName}}}: {{#isNullable}}Nullable<{{/isNullable}}{{{dataType}}}{{#isNullable}}>{{/isNullable}},
@@ -580,10 +587,36 @@ impl std::str::FromStr for {{{classname}}} {
#[derive(Debug, Clone, PartialEq, PartialOrd, serde::Serialize, serde::Deserialize)]
{{/isMap}}
#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))]
pub struct {{{classname}}}({{{dataType}}});
pub struct {{{classname}}}(pub {{{dataType}}});
impl validator::Validate for {{{classname}}} {
fn validate(&self) -> std::result::Result<(), validator::ValidationErrors> {
{{^isNullable}}
{{#vendorExtensions.is-nested}}
let _ = self.0.validate()?;
{{/vendorExtensions.is-nested}}
{{#vendorExtensions.is-string}}
let _ = check_xss_string(&self.0).map_err(from_validation_error)?;
{{/vendorExtensions.is-string}}
{{#vendorExtensions.is-vec-nested}}
for v in self.0.iter() {
let _ = v.validate()?;
}
{{/vendorExtensions.is-vec-nested}}
{{#vendorExtensions.is-vec-string}}
let _ = check_xss_vec_string(&self.0).map_err(from_validation_error)?;
{{/vendorExtensions.is-vec-string}}
{{#vendorExtensions.is-map-nested}}
let _ = check_xss_map_nested(&self.0).map_err(from_validation_error)?;
{{/vendorExtensions.is-map-nested}}
{{#vendorExtensions.is-map}}
let _ = check_xss_map(&self.0).map_err(from_validation_error)?;
{{/vendorExtensions.is-map}}
{{#vendorExtensions.is-map-string}}
let _ = check_xss_map_string(&self.0).map_err(from_validation_error)?;
{{/vendorExtensions.is-map-string}}
{{/isNullable}}
std::result::Result::Ok(())
}
}
@@ -656,7 +689,7 @@ impl ::std::str::FromStr for {{{classname}}} {
{{! vec}}
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))]
pub struct {{{classname}}}(Vec<{{{arrayModelType}}}>);
pub struct {{{classname}}}(pub Vec<{{{arrayModelType}}}>);
impl validator::Validate for {{{classname}}} {
fn validate(&self) -> std::result::Result<(), validator::ValidationErrors> {

View File

@@ -11,3 +11,6 @@ use crate::{header, types::*};
#[allow(unused_imports)]
use crate::{apis, models};
#[allow(unused_imports)]
use crate::{models::check_xss_string, models::check_xss_vec_string, models::check_xss_map_string, models::check_xss_map_nested, models::check_xss_map};

View File

@@ -5,67 +5,108 @@
#[derive(validator::Validate)]
#[allow(dead_code)]
struct {{{operationIdCamelCase}}}BodyValidator<'a> {
{{#hasValidation}}
#[validate(
{{#maxLength}}
{{#minLength}}
length(min = {{minLength}}, max = {{maxLength}}),
{{/minLength}}
{{^minLength}}
length(max = {{maxLength}}),
{{/minLength}}
{{/maxLength}}
{{^maxLength}}
{{#minLength}}
length(min = {{minLength}}),
{{/minLength}}
{{/maxLength}}
{{#pattern}}
{{#isString}}
regex(path = *RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}BodyValidator{{/lambda.uppercase}}),
{{/isString}}
{{^isString}}
custom(function = "validate_byte_{{#lambda.lowercase}}{{{operationIdCamelCase}}}BodyValidator{{/lambda.lowercase}}"),
{{/isString}}
{{/pattern}}
{{#maximum}}
{{#minimum}}
range(min = {{minimum}}, max = {{maximum}}),
{{/minimum}}
{{^minimum}}
range(max = {{maximum}}),
{{/minimum}}
{{/maximum}}
{{#minimum}}
{{^maximum}}
range(min = {{minimum}}),
{{/maximum}}
{{/minimum}}
{{#maxItems}}
{{#minItems}}
length(min = {{minItems}}, max = {{maxItems}}),
{{/minItems}}
{{^minItems}}
length(max = {{maxItems}}),
{{/minItems}}
{{/maxItems}}
{{^maxItems}}
{{#minItems}}
length(min = {{minItems}}),
{{/minItems}}
{{/maxItems}}
)]
{{/hasValidation}}
{{^x-consumes-plain-text}}
{{^hasValidation}}
{{^isMap}}
#[validate(nested)]
{{/isMap}}
{{#isModel}}
#[validate(nested)]
{{/isModel}}
{{^isModel}}
{{#hasValidation}}
#[validate(
{{#maxLength}}
{{#minLength}}
length(min = {{minLength}}, max = {{maxLength}}),
{{/minLength}}
{{^minLength}}
length(max = {{maxLength}}),
{{/minLength}}
{{/maxLength}}
{{^maxLength}}
{{#minLength}}
length(min = {{minLength}}),
{{/minLength}}
{{/maxLength}}
{{#pattern}}
{{#isString}}
regex(path = *RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}BodyValidator{{/lambda.uppercase}}),
{{/isString}}
{{^isString}}
custom(function = "validate_byte_{{#lambda.lowercase}}{{{operationIdCamelCase}}}BodyValidator{{/lambda.lowercase}}"),
{{/isString}}
{{/pattern}}
{{#isString}}
custom(function = "check_xss_string"),
{{/isString}}
{{#maximum}}
{{#minimum}}
range(min = {{minimum}}, max = {{maximum}}),
{{/minimum}}
{{^minimum}}
range(max = {{maximum}}),
{{/minimum}}
{{/maximum}}
{{#minimum}}
{{^maximum}}
range(min = {{minimum}}),
{{/maximum}}
{{/minimum}}
{{#maxItems}}
{{#minItems}}
length(min = {{minItems}}, max = {{maxItems}}),
{{/minItems}}
{{^minItems}}
length(max = {{maxItems}}),
{{/minItems}}
{{/maxItems}}
{{^maxItems}}
{{#minItems}}
length(min = {{minItems}}),
{{/minItems}}
{{/maxItems}}
{{#vendorExtensions.is-vec-nested}}
nested,
{{/vendorExtensions.is-vec-nested}}
{{#vendorExtensions.is-vec-string}}
custom(function = "check_xss_vec_string"),
{{/vendorExtensions.is-vec-string}}
{{#vendorExtensions.is-map-nested}}
custom(function = "check_xss_map_nested"),
{{/vendorExtensions.is-map-nested}}
{{#vendorExtensions.is-map}}
custom(function = "check_xss_map"),
{{/vendorExtensions.is-map}}
{{#vendorExtensions.is-map-string}}
custom(function = "check_xss_map_string"),
{{/vendorExtensions.is-map-string}} )]
{{/hasValidation}}
{{^hasValidation}}
{{#vendorExtensions.is-nested}}
#[validate(nested)]
{{/vendorExtensions.is-nested}}
{{#vendorExtensions.is-string}}
#[validate(custom(function = "check_xss_string"))]
{{/vendorExtensions.is-string}}
{{#vendorExtensions.is-vec-nested}}
#[validate(nested)]
{{/vendorExtensions.is-vec-nested}}
{{#vendorExtensions.is-vec-string}}
#[validate(custom(function = "check_xss_vec_string"))]
{{/vendorExtensions.is-vec-string}}
{{#vendorExtensions.is-map-nested}}
#[validate(custom(function = "check_xss_map_nested"))]
{{/vendorExtensions.is-map-nested}}
{{#vendorExtensions.is-map}}
#[validate(custom(function = "check_xss_map"))]
{{/vendorExtensions.is-map}}
{{#vendorExtensions.is-map-string}}
#[validate(custom(function = "check_xss_map_string"))]
{{/vendorExtensions.is-map-string}}
{{/hasValidation}}
{{/isModel}}
body: &'a {{{dataType}}},
{{/x-consumes-plain-text}}
{{#x-consumes-plain-text}}
{{#isString}}
#[validate(custom(function = "check_xss_string"))]
body: &'a String,
{{/isString}}
{{^isString}}

View File

@@ -5,7 +5,7 @@ use serde::{Deserialize, Deserializer, Serialize, Serializer};
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
#[allow(dead_code)]
pub struct Object(serde_json::Value);
pub struct Object(pub serde_json::Value);
impl validator::Validate for Object {
fn validate(&self) -> Result<(), validator::ValidationErrors> {

View File

@@ -76,8 +76,6 @@ pub async fn create(addr: &str, https: bool) {
}
} else {
info!("Starting a server (over http, so no TLS)");
// Using HTTP
let listener = TcpListener::bind(&addr).await.unwrap();
println!("Listening on http://{}", addr);
loop {

View File

@@ -1,46 +1,127 @@
## {{npmName}}@{{npmVersion}}
# {{npmName}}@{{npmVersion}}
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
A TypeScript SDK client for the {{host}} API.
Environment
* Node.js
* Webpack
* Browserify
## Usage
Language level
* ES5 - you must have a Promises/A+ library installed
* ES6
First, install the SDK from npm.
Module system
* CommonJS
* ES6 module system
```bash
npm install {{npmName}} --save
```
It can be used in both TypeScript and JavaScript. In TypeScript, the definition will be automatically resolved via `package.json`. ([Reference](https://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html))
Next, try it out.
{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}}
```ts
{{>api_example}}
```
{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}}
## Documentation
### API Endpoints
All URIs are relative to *{{basePath}}*
| Class | Method | HTTP request | Description
| ----- | ------ | ------------ | -------------
{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}/{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}}
{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}
### Models
{{#models}}{{#model}}- [{{{classname}}}]({{modelDocPath}}/{{{classname}}}.md){{/model}}
{{/models}}
### Authorization
{{^authMethods}}Endpoints do not require authorization.{{/authMethods}}
{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}}
{{#authMethods}}
<a id="{{name}}{{#isOAuth}}-{{flow}}{{/isOAuth}}"></a>
#### {{name}}{{#isOAuth}} {{flow}}{{/isOAuth}}
{{#isApiKey}}
- **Type**: API key
- **API key parameter name**: `{{keyParamName}}`
- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}}
{{/isApiKey}}
{{#isBasicBasic}}
- **Type**: HTTP basic authentication
{{/isBasicBasic}}
{{#isBasicBearer}}
- **Type**: HTTP Bearer Token authentication{{#bearerFormat}} ({{{.}}}){{/bearerFormat}}
{{/isBasicBearer}}
{{#isHttpSignature}}
- **Type**: HTTP signature authentication
{{/isHttpSignature}}
{{#isOAuth}}
- **Type**: OAuth
- **Flow**: {{flow}}
- **Authorization URL**: {{authorizationUrl}}
- **Scopes**: {{^scopes}}N/A{{/scopes}}
{{#scopes}} - `{{scope}}`: {{description}}
{{/scopes}}
{{/isOAuth}}
{{/authMethods}}
## About
This TypeScript SDK client supports the [Fetch API](https://fetch.spec.whatwg.org/)
and is automatically generated by the
[OpenAPI Generator](https://openapi-generator.tech) project:
- API version: `{{appVersion}}`
- Package version: `{{npmVersion}}`
{{^hideGenerationTimestamp}}
- Build date: `{{generatedDate}}`
{{/hideGenerationTimestamp}}
- Generator version: `{{generatorVersion}}`
- Build package: `{{generatorClass}}`
The generated npm module supports the following:
- Environments
* Node.js
* Webpack
* Browserify
- Language levels
* ES5 - you must have a Promises/A+ library installed
* ES6
- Module systems
* CommonJS
* ES6 module system
{{#infoUrl}}
For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}})
{{/infoUrl}}
## Development
### Building
To build and compile the typescript sources to javascript use:
```
To build the TypeScript source code, you need to have Node.js and npm installed.
After cloning the repository, navigate to the project directory and run:
```bash
npm install
npm run build
```
### Publishing
First build the package then run `npm publish`
Once you've built the package, you can publish it to npm:
### Consuming
navigate to the folder of your consuming project and run one of the following commands.
_published:_
```
npm install {{npmName}}@{{npmVersion}} --save
```bash
npm publish
```
_unPublished (not recommended):_
## License
```
npm install PATH_TO_GENERATED_PACKAGE --save
```
[{{licenseInfo}}]({{{licenseUrl}}})

View File

@@ -0,0 +1,63 @@
# {{classname}}{{#description}}
{{.}}{{/description}}
All URIs are relative to *{{basePath}}*
| Method | HTTP request | Description |
|------------- | ------------- | -------------|
{{#operations}}{{#operation}}| [**{{operationId}}**]({{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{commonPath}}{{path}} | {{summary}} |
{{/operation}}{{/operations}}
{{#operations}}
{{#operation}}
## {{operationId}}
> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}})
{{summary}}{{#notes}}
{{.}}{{/notes}}
### Example
```ts
{{>api_example}}
```
### Parameters
{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}}
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|{{/-last}}{{/allParams}}
{{#allParams}}| **{{paramName}}** | {{#isEnum}}{{#allowableValues}}{{#values}}`{{{.}}}`{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}{{/isEnum}}{{^isEnum}}{{#isModel}}[{{baseType}}]({{baseType}}.md){{/isModel}}{{^isModel}}`{{{dataType}}}`{{/isModel}}{{/isEnum}} | {{description}} |{{^required}} [Optional]{{/required}}{{^isContainer}}{{#defaultValue}} [Defaults to `{{.}}`]{{/defaultValue}}{{/isContainer}}{{#allowableValues}} [Enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} |
{{/allParams}}
### Return type
{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{returnType}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}`void` (Empty response body){{/returnType}}
### Authorization
{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{{name}}}{{#isOAuth}} {{flow}}{{/isOAuth}}](../README.md#{{{name}}}{{#isOAuth}}-{{flow}}{{/isOAuth}}){{^-last}}, {{/-last}}{{/authMethods}}
### HTTP request headers
- **Content-Type**: {{#consumes}}`{{{mediaType}}}`{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}}
- **Accept**: {{#produces}}`{{{mediaType}}}`{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}}
{{#responses.0}}
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
{{#responses}}
| **{{code}}** | {{message}} | {{#headers}} * {{baseName}} - {{description}} <br> {{/headers}}{{^headers.0}} - {{/headers.0}} |
{{/responses}}
{{/responses.0}}
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
{{/operation}}
{{/operations}}

View File

@@ -0,0 +1,44 @@
import {
Configuration,
{{classname}},
} from '{{npmName}}';
import type { {{operationIdCamelCase}}Request } from '{{npmName}}';
async function example() {
console.log("🚀 Testing {{npmName}} SDK...");
{{#hasAuthMethods}}
const config = new Configuration({ {{#authMethods}}{{#isBasicBasic}}
// To configure HTTP basic authorization: {{{name}}}
username: "YOUR USERNAME",
password: "YOUR PASSWORD",{{/isBasicBasic}}{{#isBasicBearer}}
// Configure HTTP bearer authorization: {{{name}}}
accessToken: "YOUR BEARER TOKEN",{{/isBasicBearer}}{{#isOAuth}}
// To configure OAuth2 access token for authorization: {{{name}}} {{{flow}}}
accessToken: "YOUR ACCESS TOKEN",{{/isOAuth}}{{#isApiKey}}
// To configure API key authorization: {{{name}}}
apiKey: "YOUR API KEY",{{/isApiKey}}{{#isHttpSignature}}
// To configure HTTP signature authorization: {{{name}}}
headers: { "YOUR HEADER NAME": "YOUR SIGNATURE" },{{/isHttpSignature}}{{/authMethods}}
});
{{/hasAuthMethods}}
const api = new {{classname}}({{#hasAuthMethods}}config{{/hasAuthMethods}});
{{#hasParams}}
const body = {
{{#allParams}}
// {{{dataType}}}{{#description}} | {{{description}}}{{/description}}{{^required}} (optional){{/required}}
{{paramName}}: {{{example}}}{{^example}}...{{/example}},
{{/allParams}}
} satisfies {{operationIdCamelCase}}Request;
{{/hasParams}}
try {
const data = await api.{{{operationId}}}({{#hasParams}}body{{/hasParams}});
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);

View File

@@ -0,0 +1,41 @@
{{#models}}{{#model}}
# {{classname}}
{{#description}}{{&description}}
{{/description}}
## Properties
Name | Type
------------ | -------------
{{#vars}}`{{name}}` | {{#isPrimitiveType}}{{dataType}}{{/isPrimitiveType}}{{^isPrimitiveType}}[{{dataType}}]({{complexType}}.md){{/isPrimitiveType}}
{{/vars}}
{{^withoutRuntimeChecks}}
## Example
```typescript
import type { {{classname}} } from '{{npmName}}'
// TODO: Update the object below with actual values
const example = {
{{#vars}}
"{{name}}": {{{example}}},
{{/vars}}
} satisfies {{classname}}
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as {{classname}}
console.log(exampleParsed)
```
{{/withoutRuntimeChecks}}
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
{{/model}}{{/models}}

View File

@@ -14,6 +14,21 @@ import java.util.List;
import static org.openapitools.codegen.TestUtils.linearize;
public class RustAxumServerCodegenTest {
@Test
public void testObjectStructFieldIsPublic() throws IOException {
Path target = Files.createTempDirectory("test");
final CodegenConfigurator configurator = new CodegenConfigurator()
.setGeneratorName("rust-axum")
.setInputSpec("src/test/resources/3_0/petstore.yaml")
.setSkipOverwrite(false)
.setOutputDir(target.toAbsolutePath().toString().replace("\\", "/"));
List<File> files = new DefaultGenerator().opts(configurator.toClientOptInput()).generate();
files.forEach(File::deleteOnExit);
Path typesPath = Path.of(target.toString(), "/src/types.rs");
TestUtils.assertFileExists(typesPath);
TestUtils.assertFileContains(typesPath, "pub struct Object(pub serde_json::Value);");
}
@Test
public void testPreventDuplicateOperationDeclaration() throws IOException {
Path target = Files.createTempDirectory("test");

View File

@@ -19,6 +19,56 @@ paths:
"application/json":
schema:
"$ref": "#/components/schemas/Message"
"/issue21143_1":
post:
operationId: i21143_1
requestBody:
required: true
content:
"application/json":
schema:
type: array
items:
type: integer
responses:
"200":
description: Re-serialize and echo the request data
content:
"application/json":
schema:
"$ref": "#/components/schemas/Message"
"/issue21143_2":
post:
operationId: i21143_2
requestBody:
required: true
content:
"application/json":
schema:
type: string
responses:
"200":
description: Re-serialize and echo the request data
content:
"application/json":
schema:
"$ref": "#/components/schemas/Message"
"/issue21143_3":
post:
operationId: i21143_3
requestBody:
required: true
content:
"application/json":
schema:
type: integer
responses:
"200":
description: Re-serialize and echo the request data
content:
"application/json":
schema:
"$ref": "#/components/schemas/Message"
components:
schemas:
Message:
@@ -87,7 +137,7 @@ components:
- d
SomethingCompletelyDifferent:
oneOf:
- items:
type: object
type: array
- type: object
- items:
type: object
type: array
- type: object

View File

@@ -1,5 +1,9 @@
apis/TestApi.ts
apis/index.ts
docs/ExtendDto.md
docs/TestApi.md
docs/TestBaseDto.md
docs/TestObjectType.md
index.ts
models/ExtendDto.ts
models/TestBaseDto.ts

View File

@@ -0,0 +1,34 @@
# ExtendDto
## Properties
Name | Type
------------ | -------------
`someItems` | [Array&lt;TestBaseDto&gt;](TestBaseDto.md)
## Example
```typescript
import type { ExtendDto } from ''
// TODO: Update the object below with actual values
const example = {
"someItems": null,
} satisfies ExtendDto
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as ExtendDto
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,66 @@
# TestApi
All URIs are relative to *http://localhost:8080*
| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**test**](TestApi.md#test) | **GET** /api/v1/test | |
## test
> Array&lt;TestBaseDto&gt; test()
### Example
```ts
import {
Configuration,
TestApi,
} from '';
import type { TestRequest } from '';
async function example() {
console.log("🚀 Testing SDK...");
const api = new TestApi();
try {
const data = await api.test();
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**Array&lt;TestBaseDto&gt;**](TestBaseDto.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | test operation | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,36 @@
# TestBaseDto
## Properties
Name | Type
------------ | -------------
`something` | string
`testObjectType` | [TestObjectType](TestObjectType.md)
## Example
```typescript
import type { TestBaseDto } from ''
// TODO: Update the object below with actual values
const example = {
"something": null,
"testObjectType": null,
} satisfies TestBaseDto
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as TestBaseDto
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,32 @@
# TestObjectType
## Properties
Name | Type
------------ | -------------
## Example
```typescript
import type { TestObjectType } from ''
// TODO: Update the object below with actual values
const example = {
} satisfies TestObjectType
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as TestObjectType
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -1,3 +1,7 @@
docs/AbstractUserDto.md
docs/BranchDto.md
docs/InternalAuthenticatedUserDto.md
docs/RemoteAuthenticatedUserDto.md
index.ts
models/AbstractUserDto.ts
models/BranchDto.ts

View File

@@ -0,0 +1,38 @@
# AbstractUserDto
## Properties
Name | Type
------------ | -------------
`username` | string
`branch` | [BranchDto](BranchDto.md)
`type` | string
## Example
```typescript
import type { AbstractUserDto } from ''
// TODO: Update the object below with actual values
const example = {
"username": null,
"branch": null,
"type": null,
} satisfies AbstractUserDto
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as AbstractUserDto
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,34 @@
# BranchDto
## Properties
Name | Type
------------ | -------------
`name` | string
## Example
```typescript
import type { BranchDto } from ''
// TODO: Update the object below with actual values
const example = {
"name": null,
} satisfies BranchDto
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as BranchDto
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,32 @@
# InternalAuthenticatedUserDto
## Properties
Name | Type
------------ | -------------
## Example
```typescript
import type { InternalAuthenticatedUserDto } from ''
// TODO: Update the object below with actual values
const example = {
} satisfies InternalAuthenticatedUserDto
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as InternalAuthenticatedUserDto
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,32 @@
# RemoteAuthenticatedUserDto
## Properties
Name | Type
------------ | -------------
## Example
```typescript
import type { RemoteAuthenticatedUserDto } from ''
// TODO: Update the object below with actual values
const example = {
} satisfies RemoteAuthenticatedUserDto
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as RemoteAuthenticatedUserDto
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -1213,10 +1213,8 @@ public class ApiClient extends JavaTimeFormatter {
try {
response = sendRequest(method, invocationBuilder, entity);
final int statusCode = response.getStatusInfo().getStatusCode();
// If OAuth is used and a status 401 is received, renew the access token and retry the request
if (authNames != null && statusCode == Status.UNAUTHORIZED.getStatusCode()) {
if (authNames != null && response.getStatusInfo().getStatusCode() == Status.UNAUTHORIZED.getStatusCode()) {
for (String authName : authNames) {
Authentication authentication = authentications.get(authName);
if (authentication instanceof OAuth) {
@@ -1230,6 +1228,8 @@ public class ApiClient extends JavaTimeFormatter {
}
}
}
final int statusCode = response.getStatusInfo().getStatusCode();
Map<String, List<String>> responseHeaders = buildResponseHeaders(response);

View File

@@ -1213,10 +1213,8 @@ public class ApiClient extends JavaTimeFormatter {
try {
response = sendRequest(method, invocationBuilder, entity);
final int statusCode = response.getStatusInfo().getStatusCode();
// If OAuth is used and a status 401 is received, renew the access token and retry the request
if (authNames != null && statusCode == Status.UNAUTHORIZED.getStatusCode()) {
if (authNames != null && response.getStatusInfo().getStatusCode() == Status.UNAUTHORIZED.getStatusCode()) {
for (String authName : authNames) {
Authentication authentication = authentications.get(authName);
if (authentication instanceof OAuth) {
@@ -1230,6 +1228,8 @@ public class ApiClient extends JavaTimeFormatter {
}
}
}
final int statusCode = response.getStatusInfo().getStatusCode();
Map<String, List<String>> responseHeaders = buildResponseHeaders(response);

View File

@@ -1295,10 +1295,8 @@ public class ApiClient extends JavaTimeFormatter {
try {
response = sendRequest(method, invocationBuilder, entity);
final int statusCode = response.getStatusInfo().getStatusCode();
// If OAuth is used and a status 401 is received, renew the access token and retry the request
if (authNames != null && statusCode == Status.UNAUTHORIZED.getStatusCode()) {
if (authNames != null && response.getStatusInfo().getStatusCode() == Status.UNAUTHORIZED.getStatusCode()) {
for (String authName : authNames) {
Authentication authentication = authentications.get(authName);
if (authentication instanceof OAuth) {
@@ -1313,6 +1311,8 @@ public class ApiClient extends JavaTimeFormatter {
}
}
final int statusCode = response.getStatusInfo().getStatusCode();
Map<String, List<String>> responseHeaders = buildResponseHeaders(response);
if (statusCode == Status.NO_CONTENT.getStatusCode()) {

View File

@@ -1,5 +1,5 @@
{
"name": "typescript-angular-v17-unit-tests",
"name": "typescript-angular-v16-unit-tests",
"version": "0.0.0",
"scripts": {
"ng": "ng",
@@ -11,24 +11,24 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^17.0.0",
"@angular/common": "^17.0.0",
"@angular/compiler": "^17.0.0",
"@angular/core": "^17.0.0",
"@angular/forms": "^17.0.0",
"@angular/platform-browser": "^17.0.0",
"@angular/platform-browser-dynamic": "^17.0.0",
"@angular/router": "^17.0.0",
"@angular/animations": "^16.1.2",
"@angular/common": "^16.1.2",
"@angular/compiler": "^16.1.2",
"@angular/core": "^16.1.2",
"@angular/forms": "^16.1.2",
"@angular/platform-browser": "^16.1.2",
"@angular/platform-browser-dynamic": "^16.1.2",
"@angular/router": "^16.1.2",
"core-js": "^3.31.0",
"rxjs": "^7.8.1",
"tslib": "^2.5.3",
"zone.js": "~0.14.0"
"zone.js": "~0.13.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "^17.0.0",
"@angular/cli": "^17.0.0",
"@angular/compiler-cli": "^17.0.0",
"@angular/language-service": "^17.0.0",
"@angular-devkit/build-angular": "^16.1.1",
"@angular/cli": "^16.1.1",
"@angular/compiler-cli": "^16.1.2",
"@angular/language-service": "^16.1.2",
"@types/jasmine": "~4.3.4",
"@types/jasminewd2": "~2.0.10",
"@types/node": "^18.16.18",

View File

@@ -26,7 +26,6 @@ describe('AppComponent', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
AppComponent,
HttpClientModule,
ApiModule.forRoot(getApiConfig)
],
@@ -35,6 +34,9 @@ describe('AppComponent', () => {
StoreService,
UserService,
...fakePetstoreBackendProviders
],
declarations: [
AppComponent
]
}).compileComponents()
}))

View File

@@ -20,6 +20,9 @@ export function getApiConfig () {
}
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
HttpClientModule,

View File

@@ -55,7 +55,7 @@
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js' // Included with Angular CLI.
import 'zone.js/dist/zone' // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS

View File

@@ -1,6 +1,6 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js/testing'
import 'zone.js/dist/zone-testing'
import { getTestBed } from '@angular/core/testing'
import {
BrowserDynamicTestingModule,

View File

@@ -1,5 +1,5 @@
{
"name": "typescript-angular-v18-unit-tests",
"name": "typescript-angular-v16-unit-tests",
"version": "0.0.0",
"scripts": {
"ng": "ng",
@@ -11,24 +11,24 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^18.0.0",
"@angular/common": "^18.0.0",
"@angular/compiler": "^18.0.0",
"@angular/core": "^18.0.0",
"@angular/forms": "^18.0.0",
"@angular/platform-browser": "^18.0.0",
"@angular/platform-browser-dynamic": "^18.0.0",
"@angular/router": "^18.0.0",
"@angular/animations": "^16.1.2",
"@angular/common": "^16.1.2",
"@angular/compiler": "^16.1.2",
"@angular/core": "^16.1.2",
"@angular/forms": "^16.1.2",
"@angular/platform-browser": "^16.1.2",
"@angular/platform-browser-dynamic": "^16.1.2",
"@angular/router": "^16.1.2",
"core-js": "^3.31.0",
"rxjs": "^7.8.1",
"tslib": "^2.5.3",
"zone.js": "~0.14.0"
"zone.js": "~0.13.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "^18.0.0",
"@angular/cli": "^18.0.0",
"@angular/compiler-cli": "^18.0.0",
"@angular/language-service": "^18.0.0",
"@angular-devkit/build-angular": "^16.1.1",
"@angular/cli": "^16.1.1",
"@angular/compiler-cli": "^16.1.2",
"@angular/language-service": "^16.1.2",
"@types/jasmine": "~4.3.4",
"@types/jasminewd2": "~2.0.10",
"@types/node": "^18.16.18",

View File

@@ -26,7 +26,6 @@ describe('AppComponent', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
AppComponent,
HttpClientModule,
ApiModule.forRoot(getApiConfig)
],
@@ -35,6 +34,9 @@ describe('AppComponent', () => {
StoreService,
UserService,
...fakePetstoreBackendProviders
],
declarations: [
AppComponent
]
}).compileComponents()
}))

View File

@@ -20,6 +20,9 @@ export function getApiConfig () {
}
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
HttpClientModule,

View File

@@ -55,7 +55,7 @@
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js' // Included with Angular CLI.
import 'zone.js/dist/zone' // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS

View File

@@ -1,6 +1,6 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js/testing'
import 'zone.js/dist/zone-testing'
import { getTestBed } from '@angular/core/testing'
import {
BrowserDynamicTestingModule,

View File

@@ -1,5 +1,8 @@
apis/DefaultApi.ts
apis/index.ts
docs/Club.md
docs/DefaultApi.md
docs/Owner.md
index.ts
models/Club.ts
models/Owner.ts

View File

@@ -0,0 +1,34 @@
# Club
## Properties
Name | Type
------------ | -------------
`owner` | [Owner](Owner.md)
## Example
```typescript
import type { Club } from ''
// TODO: Update the object below with actual values
const example = {
"owner": null,
} satisfies Club
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as Club
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,74 @@
# DefaultApi
All URIs are relative to *http://api.example.xyz/v1*
| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**list**](DefaultApi.md#list) | **GET** /person/display/{personId} | |
## list
> Club list(personId)
### Example
```ts
import {
Configuration,
DefaultApi,
} from '';
import type { ListRequest } from '';
async function example() {
console.log("🚀 Testing SDK...");
const api = new DefaultApi();
const body = {
// string | The id of the person to retrieve
personId: personId_example,
} satisfies ListRequest;
try {
const data = await api.list(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **personId** | `string` | The id of the person to retrieve | [Defaults to `undefined`] |
### Return type
[**Club**](Club.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | OK | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,34 @@
# Owner
## Properties
Name | Type
------------ | -------------
`name` | string
## Example
```typescript
import type { Owner } from ''
// TODO: Update the object below with actual values
const example = {
"name": null,
} satisfies Owner
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as Owner
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -1,5 +1,8 @@
apis/DefaultApi.ts
apis/index.ts
docs/Club.md
docs/DefaultApi.md
docs/Owner.md
index.ts
models/Club.ts
models/Owner.ts

View File

@@ -0,0 +1,34 @@
# Club
## Properties
Name | Type
------------ | -------------
`owner` | [Owner](Owner.md)
## Example
```typescript
import type { Club } from ''
// TODO: Update the object below with actual values
const example = {
"owner": null,
} satisfies Club
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as Club
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,74 @@
# DefaultApi
All URIs are relative to *http://api.example.xyz/v1*
| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**list**](DefaultApi.md#list) | **GET** /person/display/{personId} | |
## list
> Club list(personId)
### Example
```ts
import {
Configuration,
DefaultApi,
} from '';
import type { ListRequest } from '';
async function example() {
console.log("🚀 Testing SDK...");
const api = new DefaultApi();
const body = {
// string | The id of the person to retrieve
personId: personId_example,
} satisfies ListRequest;
try {
const data = await api.list(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **personId** | `string` | The id of the person to retrieve | [Defaults to `undefined`] |
### Return type
[**Club**](Club.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | OK | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,34 @@
# Owner
## Properties
Name | Type
------------ | -------------
`name` | string
## Example
```typescript
import type { Owner } from ''
// TODO: Update the object below with actual values
const example = {
"name": null,
} satisfies Owner
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as Owner
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -6,6 +6,63 @@ apis/PetApi.ts
apis/StoreApi.ts
apis/UserApi.ts
apis/index.ts
docs/AdditionalPropertiesClass.md
docs/AllOfWithSingleRef.md
docs/Animal.md
docs/AnotherFakeApi.md
docs/ArrayOfArrayOfNumberOnly.md
docs/ArrayOfNumberOnly.md
docs/ArrayTest.md
docs/Capitalization.md
docs/Cat.md
docs/Category.md
docs/ChildWithNullable.md
docs/ClassModel.md
docs/Client.md
docs/DefaultApi.md
docs/DeprecatedObject.md
docs/Dog.md
docs/EnumArrays.md
docs/EnumClass.md
docs/EnumTest.md
docs/FakeApi.md
docs/FakeBigDecimalMap200Response.md
docs/FakeClassnameTags123Api.md
docs/FileSchemaTestClass.md
docs/Foo.md
docs/FooGetDefaultResponse.md
docs/FormatTest.md
docs/HasOnlyReadOnly.md
docs/HealthCheckResult.md
docs/List.md
docs/MapTest.md
docs/MixedPropertiesAndAdditionalPropertiesClass.md
docs/Model200Response.md
docs/ModelApiResponse.md
docs/ModelFile.md
docs/Name.md
docs/NullableClass.md
docs/NumberOnly.md
docs/ObjectWithDeprecatedFields.md
docs/Order.md
docs/OuterComposite.md
docs/OuterEnum.md
docs/OuterEnumDefaultValue.md
docs/OuterEnumInteger.md
docs/OuterEnumIntegerDefaultValue.md
docs/OuterObjectWithEnumProperty.md
docs/ParentWithNullable.md
docs/Pet.md
docs/PetApi.md
docs/ReadOnlyFirst.md
docs/Return.md
docs/SingleRefType.md
docs/SpecialModelName.md
docs/StoreApi.md
docs/Tag.md
docs/TestInlineFreeformAdditionalPropertiesRequest.md
docs/User.md
docs/UserApi.md
index.ts
models/AdditionalPropertiesClass.ts
models/AllOfWithSingleRef.ts

View File

@@ -0,0 +1,36 @@
# AdditionalPropertiesClass
## Properties
Name | Type
------------ | -------------
`mapProperty` | { [key: string]: string; }
`mapOfMapProperty` | { [key: string]: { [key: string]: string; }; }
## Example
```typescript
import type { AdditionalPropertiesClass } from ''
// TODO: Update the object below with actual values
const example = {
"mapProperty": null,
"mapOfMapProperty": null,
} satisfies AdditionalPropertiesClass
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as AdditionalPropertiesClass
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,36 @@
# AllOfWithSingleRef
## Properties
Name | Type
------------ | -------------
`username` | string
`singleRefType` | [SingleRefType](SingleRefType.md)
## Example
```typescript
import type { AllOfWithSingleRef } from ''
// TODO: Update the object below with actual values
const example = {
"username": null,
"singleRefType": null,
} satisfies AllOfWithSingleRef
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as AllOfWithSingleRef
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,36 @@
# Animal
## Properties
Name | Type
------------ | -------------
`className` | string
`color` | string
## Example
```typescript
import type { Animal } from ''
// TODO: Update the object below with actual values
const example = {
"className": null,
"color": null,
} satisfies Animal
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as Animal
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,76 @@
# AnotherFakeApi
All URIs are relative to *http://petstore.swagger.io:80/v2*
| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**_123testSpecialTags**](AnotherFakeApi.md#_123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags |
## _123testSpecialTags
> Client _123testSpecialTags(client)
To test special tags
To test special tags and operation ID starting with number
### Example
```ts
import {
Configuration,
AnotherFakeApi,
} from '';
import type { 123testSpecialTagsRequest } from '';
async function example() {
console.log("🚀 Testing SDK...");
const api = new AnotherFakeApi();
const body = {
// Client | client model
client: ...,
} satisfies 123testSpecialTagsRequest;
try {
const data = await api._123testSpecialTags(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **client** | [Client](Client.md) | client model | |
### Return type
[**Client**](Client.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: `application/json`
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,34 @@
# ArrayOfArrayOfNumberOnly
## Properties
Name | Type
------------ | -------------
`arrayArrayNumber` | Array&lt;Array&lt;number&gt;&gt;
## Example
```typescript
import type { ArrayOfArrayOfNumberOnly } from ''
// TODO: Update the object below with actual values
const example = {
"arrayArrayNumber": null,
} satisfies ArrayOfArrayOfNumberOnly
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as ArrayOfArrayOfNumberOnly
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,34 @@
# ArrayOfNumberOnly
## Properties
Name | Type
------------ | -------------
`arrayNumber` | Array&lt;number&gt;
## Example
```typescript
import type { ArrayOfNumberOnly } from ''
// TODO: Update the object below with actual values
const example = {
"arrayNumber": null,
} satisfies ArrayOfNumberOnly
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as ArrayOfNumberOnly
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,38 @@
# ArrayTest
## Properties
Name | Type
------------ | -------------
`arrayOfString` | Array&lt;string&gt;
`arrayArrayOfInteger` | Array&lt;Array&lt;number&gt;&gt;
`arrayArrayOfModel` | Array&lt;Array&lt;ReadOnlyFirst&gt;&gt;
## Example
```typescript
import type { ArrayTest } from ''
// TODO: Update the object below with actual values
const example = {
"arrayOfString": null,
"arrayArrayOfInteger": null,
"arrayArrayOfModel": null,
} satisfies ArrayTest
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as ArrayTest
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,44 @@
# Capitalization
## Properties
Name | Type
------------ | -------------
`smallCamel` | string
`capitalCamel` | string
`smallSnake` | string
`capitalSnake` | string
`sCAETHFlowPoints` | string
`aTTNAME` | string
## Example
```typescript
import type { Capitalization } from ''
// TODO: Update the object below with actual values
const example = {
"smallCamel": null,
"capitalCamel": null,
"smallSnake": null,
"capitalSnake": null,
"sCAETHFlowPoints": null,
"aTTNAME": null,
} satisfies Capitalization
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as Capitalization
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,34 @@
# Cat
## Properties
Name | Type
------------ | -------------
`declawed` | boolean
## Example
```typescript
import type { Cat } from ''
// TODO: Update the object below with actual values
const example = {
"declawed": null,
} satisfies Cat
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as Cat
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,36 @@
# Category
## Properties
Name | Type
------------ | -------------
`id` | number
`name` | string
## Example
```typescript
import type { Category } from ''
// TODO: Update the object below with actual values
const example = {
"id": null,
"name": null,
} satisfies Category
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as Category
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,34 @@
# ChildWithNullable
## Properties
Name | Type
------------ | -------------
`otherProperty` | string
## Example
```typescript
import type { ChildWithNullable } from ''
// TODO: Update the object below with actual values
const example = {
"otherProperty": null,
} satisfies ChildWithNullable
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as ChildWithNullable
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,35 @@
# ClassModel
Model for testing model with \"_class\" property
## Properties
Name | Type
------------ | -------------
`_class` | string
## Example
```typescript
import type { ClassModel } from ''
// TODO: Update the object below with actual values
const example = {
"_class": null,
} satisfies ClassModel
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as ClassModel
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,34 @@
# Client
## Properties
Name | Type
------------ | -------------
`client` | string
## Example
```typescript
import type { Client } from ''
// TODO: Update the object below with actual values
const example = {
"client": null,
} satisfies Client
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as Client
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,66 @@
# DefaultApi
All URIs are relative to *http://petstore.swagger.io:80/v2*
| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**fooGet**](DefaultApi.md#fooget) | **GET** /foo | |
## fooGet
> FooGetDefaultResponse fooGet()
### Example
```ts
import {
Configuration,
DefaultApi,
} from '';
import type { FooGetRequest } from '';
async function example() {
console.log("🚀 Testing SDK...");
const api = new DefaultApi();
try {
const data = await api.fooGet();
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**FooGetDefaultResponse**](FooGetDefaultResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **0** | response | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,34 @@
# DeprecatedObject
## Properties
Name | Type
------------ | -------------
`name` | string
## Example
```typescript
import type { DeprecatedObject } from ''
// TODO: Update the object below with actual values
const example = {
"name": null,
} satisfies DeprecatedObject
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as DeprecatedObject
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,34 @@
# Dog
## Properties
Name | Type
------------ | -------------
`breed` | string
## Example
```typescript
import type { Dog } from ''
// TODO: Update the object below with actual values
const example = {
"breed": null,
} satisfies Dog
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as Dog
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,36 @@
# EnumArrays
## Properties
Name | Type
------------ | -------------
`justSymbol` | string
`arrayEnum` | Array&lt;string&gt;
## Example
```typescript
import type { EnumArrays } from ''
// TODO: Update the object below with actual values
const example = {
"justSymbol": null,
"arrayEnum": null,
} satisfies EnumArrays
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as EnumArrays
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,32 @@
# EnumClass
## Properties
Name | Type
------------ | -------------
## Example
```typescript
import type { EnumClass } from ''
// TODO: Update the object below with actual values
const example = {
} satisfies EnumClass
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as EnumClass
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,48 @@
# EnumTest
## Properties
Name | Type
------------ | -------------
`enumString` | string
`enumStringRequired` | string
`enumInteger` | number
`enumNumber` | number
`outerEnum` | [OuterEnum](OuterEnum.md)
`outerEnumInteger` | [OuterEnumInteger](OuterEnumInteger.md)
`outerEnumDefaultValue` | [OuterEnumDefaultValue](OuterEnumDefaultValue.md)
`outerEnumIntegerDefaultValue` | [OuterEnumIntegerDefaultValue](OuterEnumIntegerDefaultValue.md)
## Example
```typescript
import type { EnumTest } from ''
// TODO: Update the object below with actual values
const example = {
"enumString": null,
"enumStringRequired": null,
"enumInteger": null,
"enumNumber": null,
"outerEnum": null,
"outerEnumInteger": null,
"outerEnumDefaultValue": null,
"outerEnumIntegerDefaultValue": null,
} satisfies EnumTest
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as EnumTest
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,36 @@
# FakeBigDecimalMap200Response
## Properties
Name | Type
------------ | -------------
`someId` | number
`someMap` | { [key: string]: number; }
## Example
```typescript
import type { FakeBigDecimalMap200Response } from ''
// TODO: Update the object below with actual values
const example = {
"someId": null,
"someMap": null,
} satisfies FakeBigDecimalMap200Response
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as FakeBigDecimalMap200Response
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,80 @@
# FakeClassnameTags123Api
All URIs are relative to *http://petstore.swagger.io:80/v2*
| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**testClassname**](FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case |
## testClassname
> Client testClassname(client)
To test class name in snake case
To test class name in snake case
### Example
```ts
import {
Configuration,
FakeClassnameTags123Api,
} from '';
import type { TestClassnameRequest } from '';
async function example() {
console.log("🚀 Testing SDK...");
const config = new Configuration({
// To configure API key authorization: api_key_query
apiKey: "YOUR API KEY",
});
const api = new FakeClassnameTags123Api(config);
const body = {
// Client | client model
client: ...,
} satisfies TestClassnameRequest;
try {
const data = await api.testClassname(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **client** | [Client](Client.md) | client model | |
### Return type
[**Client**](Client.md)
### Authorization
[api_key_query](../README.md#api_key_query)
### HTTP request headers
- **Content-Type**: `application/json`
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,36 @@
# FileSchemaTestClass
## Properties
Name | Type
------------ | -------------
`file` | any
`files` | Array&lt;any&gt;
## Example
```typescript
import type { FileSchemaTestClass } from ''
// TODO: Update the object below with actual values
const example = {
"file": null,
"files": null,
} satisfies FileSchemaTestClass
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as FileSchemaTestClass
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,34 @@
# Foo
## Properties
Name | Type
------------ | -------------
`bar` | string
## Example
```typescript
import type { Foo } from ''
// TODO: Update the object below with actual values
const example = {
"bar": null,
} satisfies Foo
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as Foo
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,34 @@
# FooGetDefaultResponse
## Properties
Name | Type
------------ | -------------
`string` | [Foo](Foo.md)
## Example
```typescript
import type { FooGetDefaultResponse } from ''
// TODO: Update the object below with actual values
const example = {
"string": null,
} satisfies FooGetDefaultResponse
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as FooGetDefaultResponse
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,64 @@
# FormatTest
## Properties
Name | Type
------------ | -------------
`integer` | number
`int32` | number
`int64` | number
`number` | number
`_float` | number
`_double` | number
`decimal` | string
`string` | string
`_byte` | string
`binary` | Blob
`date` | Date
`dateTime` | Date
`uuid` | string
`password` | string
`patternWithDigits` | string
`patternWithDigitsAndDelimiter` | string
## Example
```typescript
import type { FormatTest } from ''
// TODO: Update the object below with actual values
const example = {
"integer": null,
"int32": null,
"int64": null,
"number": null,
"_float": null,
"_double": null,
"decimal": null,
"string": null,
"_byte": null,
"binary": null,
"date": null,
"dateTime": null,
"uuid": 72f98069-206d-4f12-9f12-3d1e525a8e84,
"password": null,
"patternWithDigits": null,
"patternWithDigitsAndDelimiter": null,
} satisfies FormatTest
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as FormatTest
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,36 @@
# HasOnlyReadOnly
## Properties
Name | Type
------------ | -------------
`bar` | string
`foo` | string
## Example
```typescript
import type { HasOnlyReadOnly } from ''
// TODO: Update the object below with actual values
const example = {
"bar": null,
"foo": null,
} satisfies HasOnlyReadOnly
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as HasOnlyReadOnly
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,35 @@
# HealthCheckResult
Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model.
## Properties
Name | Type
------------ | -------------
`nullableMessage` | string
## Example
```typescript
import type { HealthCheckResult } from ''
// TODO: Update the object below with actual values
const example = {
"nullableMessage": null,
} satisfies HealthCheckResult
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as HealthCheckResult
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,34 @@
# List
## Properties
Name | Type
------------ | -------------
`_123list` | string
## Example
```typescript
import type { List } from ''
// TODO: Update the object below with actual values
const example = {
"_123list": null,
} satisfies List
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as List
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,40 @@
# MapTest
## Properties
Name | Type
------------ | -------------
`mapMapOfString` | { [key: string]: { [key: string]: string; }; }
`mapOfEnumString` | { [key: string]: string; }
`directMap` | { [key: string]: boolean; }
`indirectMap` | { [key: string]: boolean; }
## Example
```typescript
import type { MapTest } from ''
// TODO: Update the object below with actual values
const example = {
"mapMapOfString": null,
"mapOfEnumString": null,
"directMap": null,
"indirectMap": null,
} satisfies MapTest
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as MapTest
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,38 @@
# MixedPropertiesAndAdditionalPropertiesClass
## Properties
Name | Type
------------ | -------------
`uuid` | string
`dateTime` | Date
`map` | [{ [key: string]: Animal; }](Animal.md)
## Example
```typescript
import type { MixedPropertiesAndAdditionalPropertiesClass } from ''
// TODO: Update the object below with actual values
const example = {
"uuid": null,
"dateTime": null,
"map": null,
} satisfies MixedPropertiesAndAdditionalPropertiesClass
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as MixedPropertiesAndAdditionalPropertiesClass
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,37 @@
# Model200Response
Model for testing model name starting with number
## Properties
Name | Type
------------ | -------------
`name` | number
`_class` | string
## Example
```typescript
import type { Model200Response } from ''
// TODO: Update the object below with actual values
const example = {
"name": null,
"_class": null,
} satisfies Model200Response
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as Model200Response
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,38 @@
# ModelApiResponse
## Properties
Name | Type
------------ | -------------
`code` | number
`type` | string
`message` | string
## Example
```typescript
import type { ModelApiResponse } from ''
// TODO: Update the object below with actual values
const example = {
"code": null,
"type": null,
"message": null,
} satisfies ModelApiResponse
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as ModelApiResponse
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,35 @@
# ModelFile
Must be named `File` for test.
## Properties
Name | Type
------------ | -------------
`sourceURI` | string
## Example
```typescript
import type { ModelFile } from ''
// TODO: Update the object below with actual values
const example = {
"sourceURI": null,
} satisfies ModelFile
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as ModelFile
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,41 @@
# Name
Model for testing model name same as property name
## Properties
Name | Type
------------ | -------------
`name` | number
`snakeCase` | number
`property` | string
`_123number` | number
## Example
```typescript
import type { Name } from ''
// TODO: Update the object below with actual values
const example = {
"name": null,
"snakeCase": null,
"property": null,
"_123number": null,
} satisfies Name
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as Name
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,56 @@
# NullableClass
## Properties
Name | Type
------------ | -------------
`integerProp` | number
`numberProp` | number
`booleanProp` | boolean
`stringProp` | string
`dateProp` | Date
`datetimeProp` | Date
`arrayNullableProp` | Array&lt;object&gt;
`arrayAndItemsNullableProp` | Array&lt;object | null&gt;
`arrayItemsNullable` | Array&lt;object | null&gt;
`objectNullableProp` | { [key: string]: object; }
`objectAndItemsNullableProp` | { [key: string]: object | null; }
`objectItemsNullable` | { [key: string]: object | null; }
## Example
```typescript
import type { NullableClass } from ''
// TODO: Update the object below with actual values
const example = {
"integerProp": null,
"numberProp": null,
"booleanProp": null,
"stringProp": null,
"dateProp": null,
"datetimeProp": null,
"arrayNullableProp": null,
"arrayAndItemsNullableProp": null,
"arrayItemsNullable": null,
"objectNullableProp": null,
"objectAndItemsNullableProp": null,
"objectItemsNullable": null,
} satisfies NullableClass
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as NullableClass
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,34 @@
# NumberOnly
## Properties
Name | Type
------------ | -------------
`justNumber` | number
## Example
```typescript
import type { NumberOnly } from ''
// TODO: Update the object below with actual values
const example = {
"justNumber": null,
} satisfies NumberOnly
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as NumberOnly
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,40 @@
# ObjectWithDeprecatedFields
## Properties
Name | Type
------------ | -------------
`uuid` | string
`id` | number
`deprecatedRef` | [DeprecatedObject](DeprecatedObject.md)
`bars` | Array&lt;string&gt;
## Example
```typescript
import type { ObjectWithDeprecatedFields } from ''
// TODO: Update the object below with actual values
const example = {
"uuid": null,
"id": null,
"deprecatedRef": null,
"bars": null,
} satisfies ObjectWithDeprecatedFields
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as ObjectWithDeprecatedFields
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,44 @@
# Order
## Properties
Name | Type
------------ | -------------
`id` | number
`petId` | number
`quantity` | number
`shipDate` | Date
`status` | string
`complete` | boolean
## Example
```typescript
import type { Order } from ''
// TODO: Update the object below with actual values
const example = {
"id": null,
"petId": null,
"quantity": null,
"shipDate": null,
"status": null,
"complete": null,
} satisfies Order
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as Order
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,38 @@
# OuterComposite
## Properties
Name | Type
------------ | -------------
`myNumber` | number
`myString` | string
`myBoolean` | boolean
## Example
```typescript
import type { OuterComposite } from ''
// TODO: Update the object below with actual values
const example = {
"myNumber": null,
"myString": null,
"myBoolean": null,
} satisfies OuterComposite
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as OuterComposite
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,32 @@
# OuterEnum
## Properties
Name | Type
------------ | -------------
## Example
```typescript
import type { OuterEnum } from ''
// TODO: Update the object below with actual values
const example = {
} satisfies OuterEnum
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as OuterEnum
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,32 @@
# OuterEnumDefaultValue
## Properties
Name | Type
------------ | -------------
## Example
```typescript
import type { OuterEnumDefaultValue } from ''
// TODO: Update the object below with actual values
const example = {
} satisfies OuterEnumDefaultValue
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as OuterEnumDefaultValue
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,32 @@
# OuterEnumInteger
## Properties
Name | Type
------------ | -------------
## Example
```typescript
import type { OuterEnumInteger } from ''
// TODO: Update the object below with actual values
const example = {
} satisfies OuterEnumInteger
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as OuterEnumInteger
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,32 @@
# OuterEnumIntegerDefaultValue
## Properties
Name | Type
------------ | -------------
## Example
```typescript
import type { OuterEnumIntegerDefaultValue } from ''
// TODO: Update the object below with actual values
const example = {
} satisfies OuterEnumIntegerDefaultValue
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as OuterEnumIntegerDefaultValue
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,34 @@
# OuterObjectWithEnumProperty
## Properties
Name | Type
------------ | -------------
`value` | [OuterEnumInteger](OuterEnumInteger.md)
## Example
```typescript
import type { OuterObjectWithEnumProperty } from ''
// TODO: Update the object below with actual values
const example = {
"value": null,
} satisfies OuterObjectWithEnumProperty
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as OuterObjectWithEnumProperty
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,36 @@
# ParentWithNullable
## Properties
Name | Type
------------ | -------------
`type` | string
`nullableProperty` | string
## Example
```typescript
import type { ParentWithNullable } from ''
// TODO: Update the object below with actual values
const example = {
"type": null,
"nullableProperty": null,
} satisfies ParentWithNullable
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as ParentWithNullable
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

Some files were not shown because too many files have changed in this diff Show More