mirror of
https://github.com/ferdikoomen/openapi-typescript-codegen.git
synced 2025-12-08 20:16:21 +00:00
Merge branch 'master' into add-model-postfix
This commit is contained in:
commit
cf4f2f92f6
1983
package-lock.json
generated
1983
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
28
package.json
28
package.json
@ -77,28 +77,28 @@
|
||||
"@angular/platform-browser": "14.0.1",
|
||||
"@angular/platform-browser-dynamic": "14.0.1",
|
||||
"@angular/router": "14.0.1",
|
||||
"@babel/cli": "7.18.6",
|
||||
"@babel/core": "7.18.6",
|
||||
"@babel/preset-env": "7.18.6",
|
||||
"@babel/cli": "7.18.10",
|
||||
"@babel/core": "7.18.13",
|
||||
"@babel/preset-env": "7.19.0",
|
||||
"@babel/preset-typescript": "7.18.6",
|
||||
"@rollup/plugin-commonjs": "22.0.1",
|
||||
"@rollup/plugin-commonjs": "22.0.2",
|
||||
"@rollup/plugin-node-resolve": "13.3.0",
|
||||
"@rollup/plugin-typescript": "8.3.3",
|
||||
"@rollup/plugin-typescript": "8.5.0",
|
||||
"@types/cross-spawn": "6.0.2",
|
||||
"@types/express": "4.17.13",
|
||||
"@types/fs-extra": "^9.0.13",
|
||||
"@types/glob": "7.2.0",
|
||||
"@types/jest": "28.1.5",
|
||||
"@types/node": "18.0.4",
|
||||
"@types/jest": "28.1.8",
|
||||
"@types/node": "18.7.17",
|
||||
"@types/node-fetch": "2.6.1",
|
||||
"@types/qs": "6.9.7",
|
||||
"@typescript-eslint/eslint-plugin": "5.30.6",
|
||||
"@typescript-eslint/parser": "5.30.6",
|
||||
"@typescript-eslint/eslint-plugin": "5.36.2",
|
||||
"@typescript-eslint/parser": "5.37.0",
|
||||
"abort-controller": "3.0.0",
|
||||
"axios": "0.27.2",
|
||||
"codecov": "3.8.3",
|
||||
"cross-spawn": "7.0.3",
|
||||
"eslint": "8.19.0",
|
||||
"eslint": "8.23.1",
|
||||
"eslint-config-prettier": "8.5.0",
|
||||
"eslint-plugin-prettier": "4.2.1",
|
||||
"eslint-plugin-simple-import-sort": "7.0.0",
|
||||
@ -108,16 +108,16 @@
|
||||
"jest": "28.1.3",
|
||||
"jest-cli": "28.1.3",
|
||||
"prettier": "2.7.1",
|
||||
"puppeteer": "15.4.0",
|
||||
"puppeteer": "15.5.0",
|
||||
"qs": "6.11.0",
|
||||
"rimraf": "3.0.2",
|
||||
"rollup": "2.76.0",
|
||||
"rollup": "2.79.0",
|
||||
"rollup-plugin-terser": "7.0.2",
|
||||
"rxjs": "7.5.6",
|
||||
"ts-node": "10.8.2",
|
||||
"ts-node": "10.9.1",
|
||||
"tslib": "2.4.0",
|
||||
"typescript": "4.7.3",
|
||||
"zone.js": "0.11.6"
|
||||
"zone.js": "0.11.8"
|
||||
},
|
||||
"resolutions": {
|
||||
"node-fetch": "2.6.7"
|
||||
|
||||
@ -95,9 +95,13 @@ export const getModel = (
|
||||
}
|
||||
}
|
||||
|
||||
if (definition.type === 'object' && typeof definition.additionalProperties === 'object') {
|
||||
if (definition.additionalProperties.$ref) {
|
||||
const additionalProperties = getType(definition.additionalProperties.$ref);
|
||||
if (
|
||||
definition.type === 'object' &&
|
||||
(typeof definition.additionalProperties === 'object' || definition.additionalProperties === true)
|
||||
) {
|
||||
const ap = typeof definition.additionalProperties === 'object' ? definition.additionalProperties : {};
|
||||
if (ap.$ref) {
|
||||
const additionalProperties = getType(ap.$ref);
|
||||
model.export = 'dictionary';
|
||||
model.type = additionalProperties.type;
|
||||
model.base = additionalProperties.base;
|
||||
@ -106,7 +110,7 @@ export const getModel = (
|
||||
model.default = getModelDefault(definition, model);
|
||||
return model;
|
||||
} else {
|
||||
const additionalProperties = getModel(openApi, definition.additionalProperties);
|
||||
const additionalProperties = getModel(openApi, ap);
|
||||
model.export = 'dictionary';
|
||||
model.type = additionalProperties.type;
|
||||
model.base = additionalProperties.base;
|
||||
@ -146,12 +150,12 @@ export const getModel = (
|
||||
}
|
||||
|
||||
if (definition.type === 'object') {
|
||||
model.export = 'interface';
|
||||
model.type = 'any';
|
||||
model.base = 'any';
|
||||
model.default = getModelDefault(definition, model);
|
||||
|
||||
if (definition.properties) {
|
||||
model.export = 'interface';
|
||||
model.type = 'any';
|
||||
model.base = 'any';
|
||||
model.default = getModelDefault(definition, model);
|
||||
|
||||
const modelProperties = getModelProperties(openApi, definition, getModel, model);
|
||||
modelProperties.forEach(modelProperty => {
|
||||
model.imports.push(...modelProperty.imports);
|
||||
@ -161,8 +165,18 @@ export const getModel = (
|
||||
model.enums.push(modelProperty);
|
||||
}
|
||||
});
|
||||
return model;
|
||||
} else {
|
||||
const additionalProperties = getModel(openApi, {});
|
||||
model.export = 'dictionary';
|
||||
model.type = additionalProperties.type;
|
||||
model.base = additionalProperties.base;
|
||||
model.template = additionalProperties.template;
|
||||
model.link = additionalProperties;
|
||||
model.imports.push(...additionalProperties.imports);
|
||||
model.default = getModelDefault(definition, model);
|
||||
return model;
|
||||
}
|
||||
return model;
|
||||
}
|
||||
|
||||
// If the schema has a type than it can be a basic or generic type.
|
||||
|
||||
@ -3,7 +3,8 @@ const getResponseBody = async (response: Response): Promise<any> => {
|
||||
try {
|
||||
const contentType = response.headers.get('Content-Type');
|
||||
if (contentType) {
|
||||
const isJSON = contentType.toLowerCase().startsWith('application/json');
|
||||
const jsonTypes = ['application/json', 'application/problem+json']
|
||||
const isJSON = jsonTypes.some(type => contentType.toLowerCase().startsWith(type));
|
||||
if (isJSON) {
|
||||
return await response.json();
|
||||
} else {
|
||||
|
||||
@ -3,7 +3,8 @@ const getResponseBody = async (response: Response): Promise<any> => {
|
||||
try {
|
||||
const contentType = response.headers.get('Content-Type');
|
||||
if (contentType) {
|
||||
const isJSON = contentType.toLowerCase().startsWith('application/json');
|
||||
const jsonTypes = ['application/json', 'application/problem+json']
|
||||
const isJSON = jsonTypes.some(type => contentType.toLowerCase().startsWith(type));
|
||||
if (isJSON) {
|
||||
return await response.json();
|
||||
} else {
|
||||
|
||||
@ -3,7 +3,8 @@ const getResponseBody = (xhr: XMLHttpRequest): any => {
|
||||
try {
|
||||
const contentType = xhr.getResponseHeader('Content-Type');
|
||||
if (contentType) {
|
||||
const isJSON = contentType.toLowerCase().startsWith('application/json');
|
||||
const jsonTypes = ['application/json', 'application/problem+json']
|
||||
const isJSON = jsonTypes.some(type => contentType.toLowerCase().startsWith(type));
|
||||
if (isJSON) {
|
||||
return JSON.parse(xhr.responseText);
|
||||
} else {
|
||||
|
||||
@ -32,7 +32,9 @@ import { request as __request } from '../core/request';
|
||||
{{/if}}
|
||||
|
||||
{{#equals @root.httpClient 'angular'}}
|
||||
@Injectable()
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
{{/equals}}
|
||||
export class {{{name}}}{{{@root.postfix}}} {
|
||||
{{#if @root.exportClient}}
|
||||
|
||||
@ -10,5 +10,7 @@ describe('getPattern', () => {
|
||||
expect(getPattern('\\')).toEqual('\\\\');
|
||||
expect(getPattern('\\/')).toEqual('\\\\/');
|
||||
expect(getPattern('\\/\\/')).toEqual('\\\\/\\\\/');
|
||||
// eslint-disable-next-line prettier/prettier
|
||||
expect(getPattern("'")).toEqual("\\'");
|
||||
});
|
||||
});
|
||||
|
||||
@ -3,8 +3,12 @@
|
||||
* However, to use it in HTML or inside new RegExp() we need to
|
||||
* escape the pattern to become: '^\\d{3}-\\d{2}-\\d{4}$' in order
|
||||
* to make it a valid regexp string.
|
||||
*
|
||||
* Also, escape single quote characters, because the output uses single quotes for strings
|
||||
*
|
||||
* @param pattern
|
||||
*/
|
||||
export const getPattern = (pattern?: string): string | undefined => {
|
||||
return pattern?.replace(/\\/g, '\\\\');
|
||||
// eslint-disable-next-line prettier/prettier
|
||||
return pattern?.replace(/\\/g, '\\\\').replace(/'/g, "\\'");
|
||||
};
|
||||
|
||||
@ -463,7 +463,8 @@ const getResponseBody = async (response: Response): Promise<any> => {
|
||||
try {
|
||||
const contentType = response.headers.get('Content-Type');
|
||||
if (contentType) {
|
||||
const isJSON = contentType.toLowerCase().startsWith('application/json');
|
||||
const jsonTypes = ['application/json', 'application/problem+json']
|
||||
const isJSON = jsonTypes.some(type => contentType.toLowerCase().startsWith(type));
|
||||
if (isJSON) {
|
||||
return await response.json();
|
||||
} else {
|
||||
@ -1298,6 +1299,7 @@ export type ModelWithPattern = {
|
||||
readonly modified?: string;
|
||||
id?: string;
|
||||
text?: string;
|
||||
patternWithSingleQuotes?: string;
|
||||
};
|
||||
|
||||
"
|
||||
@ -2089,6 +2091,10 @@ export const $ModelWithPattern = {
|
||||
type: 'string',
|
||||
pattern: '^\\\\\\\\w+$',
|
||||
},
|
||||
patternWithSingleQuotes: {
|
||||
type: 'string',
|
||||
pattern: '^[a-zA-Z0-9\\\\']*$',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
"
|
||||
@ -3522,7 +3528,8 @@ const getResponseBody = async (response: Response): Promise<any> => {
|
||||
try {
|
||||
const contentType = response.headers.get('Content-Type');
|
||||
if (contentType) {
|
||||
const isJSON = contentType.toLowerCase().startsWith('application/json');
|
||||
const jsonTypes = ['application/json', 'application/problem+json']
|
||||
const isJSON = jsonTypes.some(type => contentType.toLowerCase().startsWith(type));
|
||||
if (isJSON) {
|
||||
return await response.json();
|
||||
} else {
|
||||
@ -3607,71 +3614,6 @@ export { CancelablePromise, CancelError } from './core/CancelablePromise';
|
||||
export { OpenAPI } from './core/OpenAPI';
|
||||
export type { OpenAPIConfig } from './core/OpenAPI';
|
||||
|
||||
export type { ArrayWithArray as ArrayWithArrayDto } from './models/ArrayWithArray';
|
||||
export type { ArrayWithBooleans as ArrayWithBooleansDto } from './models/ArrayWithBooleans';
|
||||
export type { ArrayWithNumbers as ArrayWithNumbersDto } from './models/ArrayWithNumbers';
|
||||
export type { ArrayWithProperties as ArrayWithPropertiesDto } from './models/ArrayWithProperties';
|
||||
export type { ArrayWithReferences as ArrayWithReferencesDto } from './models/ArrayWithReferences';
|
||||
export type { ArrayWithStrings as ArrayWithStringsDto } from './models/ArrayWithStrings';
|
||||
export type { CommentWithBackticks as CommentWithBackticksDto } from './models/CommentWithBackticks';
|
||||
export type { CommentWithBreaks as CommentWithBreaksDto } from './models/CommentWithBreaks';
|
||||
export type { CommentWithExpressionPlaceholders as CommentWithExpressionPlaceholdersDto } from './models/CommentWithExpressionPlaceholders';
|
||||
export type { CommentWithQuotes as CommentWithQuotesDto } from './models/CommentWithQuotes';
|
||||
export type { CommentWithReservedCharacters as CommentWithReservedCharactersDto } from './models/CommentWithReservedCharacters';
|
||||
export type { CommentWithSlashes as CommentWithSlashesDto } from './models/CommentWithSlashes';
|
||||
export type { CompositionBaseModel as CompositionBaseModelDto } from './models/CompositionBaseModel';
|
||||
export type { CompositionExtendedModel as CompositionExtendedModelDto } from './models/CompositionExtendedModel';
|
||||
export type { CompositionWithAllOfAndNullable as CompositionWithAllOfAndNullableDto } from './models/CompositionWithAllOfAndNullable';
|
||||
export type { CompositionWithAnyOf as CompositionWithAnyOfDto } from './models/CompositionWithAnyOf';
|
||||
export type { CompositionWithAnyOfAndNullable as CompositionWithAnyOfAndNullableDto } from './models/CompositionWithAnyOfAndNullable';
|
||||
export type { CompositionWithAnyOfAnonymous as CompositionWithAnyOfAnonymousDto } from './models/CompositionWithAnyOfAnonymous';
|
||||
export type { CompositionWithOneOf as CompositionWithOneOfDto } from './models/CompositionWithOneOf';
|
||||
export type { CompositionWithOneOfAndComplexArrayDictionary as CompositionWithOneOfAndComplexArrayDictionaryDto } from './models/CompositionWithOneOfAndComplexArrayDictionary';
|
||||
export type { CompositionWithOneOfAndNullable as CompositionWithOneOfAndNullableDto } from './models/CompositionWithOneOfAndNullable';
|
||||
export type { CompositionWithOneOfAndSimpleArrayDictionary as CompositionWithOneOfAndSimpleArrayDictionaryDto } from './models/CompositionWithOneOfAndSimpleArrayDictionary';
|
||||
export type { CompositionWithOneOfAndSimpleDictionary as CompositionWithOneOfAndSimpleDictionaryDto } from './models/CompositionWithOneOfAndSimpleDictionary';
|
||||
export type { CompositionWithOneOfAnonymous as CompositionWithOneOfAnonymousDto } from './models/CompositionWithOneOfAnonymous';
|
||||
export type { CompositionWithOneOfDiscriminator as CompositionWithOneOfDiscriminatorDto } from './models/CompositionWithOneOfDiscriminator';
|
||||
export type { DeprecatedModel as DeprecatedModelDto } from './models/DeprecatedModel';
|
||||
export type { DictionaryWithArray as DictionaryWithArrayDto } from './models/DictionaryWithArray';
|
||||
export type { DictionaryWithDictionary as DictionaryWithDictionaryDto } from './models/DictionaryWithDictionary';
|
||||
export type { DictionaryWithProperties as DictionaryWithPropertiesDto } from './models/DictionaryWithProperties';
|
||||
export type { DictionaryWithReference as DictionaryWithReferenceDto } from './models/DictionaryWithReference';
|
||||
export type { DictionaryWithString as DictionaryWithStringDto } from './models/DictionaryWithString';
|
||||
export type { EnumFromDescription as EnumFromDescriptionDto } from './models/EnumFromDescription';
|
||||
export { EnumWithExtensions as EnumWithExtensionsDto } from './models/EnumWithExtensions';
|
||||
export { EnumWithNumbers as EnumWithNumbersDto } from './models/EnumWithNumbers';
|
||||
export { EnumWithStrings as EnumWithStringsDto } from './models/EnumWithStrings';
|
||||
export type { File as FileDto } from './models/File';
|
||||
export type { ModelCircle as ModelCircleDto } from './models/ModelCircle';
|
||||
export type { ModelSquare as ModelSquareDto } from './models/ModelSquare';
|
||||
export type { ModelThatExtends as ModelThatExtendsDto } from './models/ModelThatExtends';
|
||||
export type { ModelThatExtendsExtends as ModelThatExtendsExtendsDto } from './models/ModelThatExtendsExtends';
|
||||
export type { ModelWithArray as ModelWithArrayDto } from './models/ModelWithArray';
|
||||
export type { ModelWithBoolean as ModelWithBooleanDto } from './models/ModelWithBoolean';
|
||||
export type { ModelWithCircularReference as ModelWithCircularReferenceDto } from './models/ModelWithCircularReference';
|
||||
export type { ModelWithDictionary as ModelWithDictionaryDto } from './models/ModelWithDictionary';
|
||||
export type { ModelWithDuplicateImports as ModelWithDuplicateImportsDto } from './models/ModelWithDuplicateImports';
|
||||
export type { ModelWithDuplicateProperties as ModelWithDuplicatePropertiesDto } from './models/ModelWithDuplicateProperties';
|
||||
export { ModelWithEnum as ModelWithEnumDto } from './models/ModelWithEnum';
|
||||
export type { ModelWithEnumFromDescription as ModelWithEnumFromDescriptionDto } from './models/ModelWithEnumFromDescription';
|
||||
export type { ModelWithInteger as ModelWithIntegerDto } from './models/ModelWithInteger';
|
||||
export type { ModelWithNestedEnums as ModelWithNestedEnumsDto } from './models/ModelWithNestedEnums';
|
||||
export type { ModelWithNestedProperties as ModelWithNestedPropertiesDto } from './models/ModelWithNestedProperties';
|
||||
export type { ModelWithNullableString as ModelWithNullableStringDto } from './models/ModelWithNullableString';
|
||||
export type { ModelWithOrderedProperties as ModelWithOrderedPropertiesDto } from './models/ModelWithOrderedProperties';
|
||||
export type { ModelWithPattern as ModelWithPatternDto } from './models/ModelWithPattern';
|
||||
export type { ModelWithProperties as ModelWithPropertiesDto } from './models/ModelWithProperties';
|
||||
export type { ModelWithReference as ModelWithReferenceDto } from './models/ModelWithReference';
|
||||
export type { ModelWithString as ModelWithStringDto } from './models/ModelWithString';
|
||||
export type { Pageable as PageableDto } from './models/Pageable';
|
||||
export type { SimpleBoolean as SimpleBooleanDto } from './models/SimpleBoolean';
|
||||
export type { SimpleFile as SimpleFileDto } from './models/SimpleFile';
|
||||
export type { SimpleInteger as SimpleIntegerDto } from './models/SimpleInteger';
|
||||
export type { SimpleReference as SimpleReferenceDto } from './models/SimpleReference';
|
||||
export type { SimpleString as SimpleStringDto } from './models/SimpleString';
|
||||
export type { SimpleStringWithPattern as SimpleStringWithPatternDto } from './models/SimpleStringWithPattern';
|
||||
|
||||
export { $ArrayWithArray } from './schemas/$ArrayWithArray';
|
||||
export { $ArrayWithBooleans } from './schemas/$ArrayWithBooleans';
|
||||
export { $ArrayWithNumbers } from './schemas/$ArrayWithNumbers';
|
||||
@ -3708,6 +3650,9 @@ export { $EnumWithExtensions } from './schemas/$EnumWithExtensions';
|
||||
export { $EnumWithNumbers } from './schemas/$EnumWithNumbers';
|
||||
export { $EnumWithStrings } from './schemas/$EnumWithStrings';
|
||||
export { $File } from './schemas/$File';
|
||||
export { $FreeFormObjectWithAdditionalPropertiesEqEmptyObject } from './schemas/$FreeFormObjectWithAdditionalPropertiesEqEmptyObject';
|
||||
export { $FreeFormObjectWithAdditionalPropertiesEqTrue } from './schemas/$FreeFormObjectWithAdditionalPropertiesEqTrue';
|
||||
export { $FreeFormObjectWithoutAdditionalProperties } from './schemas/$FreeFormObjectWithoutAdditionalProperties';
|
||||
export { $ModelCircle } from './schemas/$ModelCircle';
|
||||
export { $ModelSquare } from './schemas/$ModelSquare';
|
||||
export { $ModelThatExtends } from './schemas/$ModelThatExtends';
|
||||
@ -4334,6 +4279,42 @@ export type File = {
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`v3 should generate: ./test/generated/v3/models/FreeFormObjectWithAdditionalPropertiesEqEmptyObject.ts 1`] = `
|
||||
"/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* This is a free-form object with additionalProperties: {}.
|
||||
*/
|
||||
export type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = Record<string, any>;
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`v3 should generate: ./test/generated/v3/models/FreeFormObjectWithAdditionalPropertiesEqTrue.ts 1`] = `
|
||||
"/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* This is a free-form object with additionalProperties: true.
|
||||
*/
|
||||
export type FreeFormObjectWithAdditionalPropertiesEqTrue = Record<string, any>;
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`v3 should generate: ./test/generated/v3/models/FreeFormObjectWithoutAdditionalProperties.ts 1`] = `
|
||||
"/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* This is a free-form object without additionalProperties.
|
||||
*/
|
||||
export type FreeFormObjectWithoutAdditionalProperties = Record<string, any>;
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`v3 should generate: ./test/generated/v3/models/ModelCircle.ts 1`] = `
|
||||
"/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
@ -4693,6 +4674,7 @@ export type ModelWithPattern = {
|
||||
readonly modified?: string;
|
||||
id?: string;
|
||||
text?: string;
|
||||
patternWithSingleQuotes?: string;
|
||||
};
|
||||
|
||||
"
|
||||
@ -5514,6 +5496,48 @@ export const $File = {
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`v3 should generate: ./test/generated/v3/schemas/$FreeFormObjectWithAdditionalPropertiesEqEmptyObject.ts 1`] = `
|
||||
"/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export const $FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {
|
||||
type: 'dictionary',
|
||||
contains: {
|
||||
properties: {
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`v3 should generate: ./test/generated/v3/schemas/$FreeFormObjectWithAdditionalPropertiesEqTrue.ts 1`] = `
|
||||
"/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export const $FreeFormObjectWithAdditionalPropertiesEqTrue = {
|
||||
type: 'dictionary',
|
||||
contains: {
|
||||
properties: {
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`v3 should generate: ./test/generated/v3/schemas/$FreeFormObjectWithoutAdditionalProperties.ts 1`] = `
|
||||
"/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export const $FreeFormObjectWithoutAdditionalProperties = {
|
||||
type: 'dictionary',
|
||||
contains: {
|
||||
properties: {
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`v3 should generate: ./test/generated/v3/schemas/$ModelCircle.ts 1`] = `
|
||||
"/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
@ -5929,6 +5953,10 @@ export const $ModelWithPattern = {
|
||||
type: 'string',
|
||||
pattern: '^\\\\\\\\w+$',
|
||||
},
|
||||
patternWithSingleQuotes: {
|
||||
type: 'string',
|
||||
pattern: '^[a-zA-Z0-9\\\\']*$',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
"
|
||||
@ -7148,14 +7176,14 @@ export class TypesService {
|
||||
*/
|
||||
public static types(
|
||||
parameterArray: Array<string> | null,
|
||||
parameterDictionary: any,
|
||||
parameterDictionary: Record<string, any> | null,
|
||||
parameterEnum: 'Success' | 'Warning' | 'Error' | null,
|
||||
parameterNumber: number = 123,
|
||||
parameterString: string | null = 'default',
|
||||
parameterBoolean: boolean | null = true,
|
||||
parameterObject: any = null,
|
||||
parameterObject: Record<string, any> | null = null,
|
||||
id?: number,
|
||||
): CancelablePromise<number | string | boolean | any> {
|
||||
): CancelablePromise<number | string | boolean | Record<string, any>> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/api/v{api-version}/types',
|
||||
|
||||
@ -1499,6 +1499,10 @@
|
||||
"text": {
|
||||
"type": "string",
|
||||
"pattern": "^\\w+$"
|
||||
},
|
||||
"patternWithSingleQuotes": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-zA-Z0-9']*$"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2466,6 +2466,10 @@
|
||||
"text": {
|
||||
"type": "string",
|
||||
"pattern": "^\\w+$"
|
||||
},
|
||||
"patternWithSingleQuotes": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-zA-Z0-9']*$"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -2527,6 +2531,20 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"FreeFormObjectWithoutAdditionalProperties": {
|
||||
"description": "This is a free-form object without additionalProperties.",
|
||||
"type": "object"
|
||||
},
|
||||
"FreeFormObjectWithAdditionalPropertiesEqTrue": {
|
||||
"description": "This is a free-form object with additionalProperties: true.",
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
},
|
||||
"FreeFormObjectWithAdditionalPropertiesEqEmptyObject": {
|
||||
"description": "This is a free-form object with additionalProperties: {}.",
|
||||
"type": "object",
|
||||
"additionalProperties": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user