Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
7e41eaf
fix(csharp): use runtime .NET version detection for query param URL-e…
sagadira May 8, 2026
401bba6
minor refactoring (avoid another variable declaration) (#23718)
wing328 May 8, 2026
930fc30
[typescript-fetch] Fix `instanceOf` type guards for discriminated uni…
jasperpatterson May 8, 2026
4f1bc49
build(deps): bump fast-uri from 3.1.0 to 3.1.2 in /website (#23730)
dependabot[bot] May 9, 2026
f87ef87
build(deps): bump fast-uri (#23721)
dependabot[bot] May 9, 2026
dd59b06
build(deps-dev): bump fast-uri (#23722)
dependabot[bot] May 9, 2026
bbca9cf
build(deps-dev): bump @babel/plugin-transform-modules-systemjs (#23723)
dependabot[bot] May 9, 2026
800646d
build(deps-dev): bump @babel/plugin-transform-modules-systemjs (#23724)
dependabot[bot] May 9, 2026
21b0969
build(deps-dev): bump fast-uri (#23725)
dependabot[bot] May 9, 2026
389f52c
build(deps-dev): bump hono (#23735)
dependabot[bot] May 9, 2026
2c46d6b
build(deps-dev): bump hono in /samples/client/others/typescript-angul…
dependabot[bot] May 9, 2026
2afbbbf
build(deps-dev): bump hono (#23736)
dependabot[bot] May 9, 2026
dfdc5ae
build(deps-dev): bump fast-uri (#23733)
dependabot[bot] May 9, 2026
0a1225e
build(deps-dev): bump fast-uri (#23731)
dependabot[bot] May 9, 2026
578c9d9
build(deps-dev): bump @babel/plugin-transform-modules-systemjs (#23729)
dependabot[bot] May 9, 2026
af5b49d
build(deps-dev): bump fast-uri (#23728)
dependabot[bot] May 9, 2026
aceeabb
build(deps): bump fast-uri (#23727)
dependabot[bot] May 9, 2026
e6e66c0
build(deps-dev): bump @babel/plugin-transform-modules-systemjs (#23726)
dependabot[bot] May 9, 2026
a3bdef7
build(deps): bump ip-address and express-rate-limit (#23709)
dependabot[bot] May 9, 2026
2ae3b13
build(deps-dev): bump fast-uri (#23732)
dependabot[bot] May 9, 2026
4a2601d
build(deps-dev): bump hono (#23737)
dependabot[bot] May 9, 2026
0a549a8
build(deps-dev): bump hono (#23740)
dependabot[bot] May 9, 2026
400a0d6
build(deps-dev): bump hono (#23741)
dependabot[bot] May 9, 2026
44b6862
build(deps-dev): bump hono (#23742)
dependabot[bot] May 9, 2026
9cac97a
build(deps-dev): bump @babel/plugin-transform-modules-systemjs (#23739)
dependabot[bot] May 9, 2026
9b6c308
build(deps-dev): bump hono (#23738)
dependabot[bot] May 9, 2026
442a1eb
build(deps-dev): bump @babel/plugin-transform-modules-systemjs (#23747)
dependabot[bot] May 9, 2026
14540e1
build(deps-dev): bump @babel/plugin-transform-modules-systemjs (#23746)
dependabot[bot] May 9, 2026
e83d3ba
build(deps-dev): bump @babel/plugin-transform-modules-systemjs (#23745)
dependabot[bot] May 9, 2026
6a0da9b
build(deps-dev): bump @babel/plugin-transform-modules-systemjs (#23744)
dependabot[bot] May 9, 2026
c22c0f5
build(deps): bump @babel/plugin-transform-modules-systemjs in /websit…
dependabot[bot] May 9, 2026
7a14a43
Kotlin multiplatform delete body (#23754)
walterbrebels May 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1401,6 +1401,7 @@ public ExtendedCodegenProperty(CodegenProperty cp) {
this.xmlName = cp.xmlName;
this.xmlNamespace = cp.xmlNamespace;
this.isXmlWrapped = cp.isXmlWrapped;
this.setHasSanitizedName(cp.getHasSanitizedName());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ namespace {{packageName}}.Client
{
HashAlgorithm = HashAlgorithmName.SHA256;
SigningAlgorithm = "PKCS1-v15";
_skipUrlEncode = RuntimeInformation.FrameworkDescription.StartsWith(".NET ") &&
int.TryParse(RuntimeInformation.FrameworkDescription.Substring(5).Split('.')[0], out int fwMajor) && fwMajor >= 9;
Comment on lines +28 to +29

@cubic-dev-ai cubic-dev-ai Bot Aug 3, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: HTTP-signature clients targeting the supported net47 framework no longer compile: the constructor references RuntimeInformation, which is unavailable in the .NET Framework 4.7 reference assemblies. Guarding this initialization with NETCOREAPP preserves the new behavior where it is used without breaking net47 generation.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At modules/openapi-generator/src/main/resources/csharp/HttpSigningConfiguration.mustache, line 28:

<comment>HTTP-signature clients targeting the supported `net47` framework no longer compile: the constructor references `RuntimeInformation`, which is unavailable in the .NET Framework 4.7 reference assemblies. Guarding this initialization with `NETCOREAPP` preserves the new behavior where it is used without breaking `net47` generation.</comment>

<file context>
@@ -25,6 +25,8 @@ namespace {{packageName}}.Client
         {
             HashAlgorithm = HashAlgorithmName.SHA256;
             SigningAlgorithm = "PKCS1-v15";
+            _skipUrlEncode = RuntimeInformation.FrameworkDescription.StartsWith(".NET ") &&
+                int.TryParse(RuntimeInformation.FrameworkDescription.Substring(5).Split('.')[0], out int fwMajor) && fwMajor >= 9;
         }
</file context>
Suggested change
_skipUrlEncode = RuntimeInformation.FrameworkDescription.StartsWith(".NET ") &&
int.TryParse(RuntimeInformation.FrameworkDescription.Substring(5).Split('.')[0], out int fwMajor) && fwMajor >= 9;
#if (NETCOREAPP)
_skipUrlEncode = RuntimeInformation.FrameworkDescription.StartsWith(".NET ") &&
int.TryParse(RuntimeInformation.FrameworkDescription.Substring(5).Split('.')[0], out int fwMajor) && fwMajor >= 9;
#endif
Fix with cubic

}

/// <summary>
Expand Down Expand Up @@ -67,6 +69,14 @@ namespace {{packageName}}.Client
/// </summary>
public int SignatureValidityPeriod { get; set; }

// On .NET 9+, HttpUtility.ParseQueryString already URL-encodes keys internally,
// so calling UrlEncode again would cause double-encoding and produce a signature
// that does not match the actual request sent by RestSharp 112+.
// On .NET 8 and earlier, keys must be explicitly URL-encoded so that special
// characters (e.g. '$' in OData params like $filter) are encoded the same way
// in the signature as they are in the outgoing HTTP request.
private readonly bool _skipUrlEncode;

private enum PrivateKeyType
{
None = 0,
Expand Down Expand Up @@ -133,8 +143,7 @@ namespace {{packageName}}.Client
foreach (var parameter in requestOptions.QueryParameters)
{
#if (NETCOREAPP)
string framework = RuntimeInformation.FrameworkDescription;
string key = framework.StartsWith(".NET 9") ? parameter.Key : {{#net90OrLater}}HttpUtility.UrlEncode({{/net90OrLater}}parameter.Key{{#net90OrLater}}){{/net90OrLater}};
string key = _skipUrlEncode ? parameter.Key : HttpUtility.UrlEncode(parameter.Key);
if (parameter.Value.Count > 1)
{ // array
foreach (var value in parameter.Value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ import {{packageName}}.auth.*
}
this.method = requestConfig.method.httpMethod
headers.filter { header -> !UNSAFE_HEADERS.contains(header.key) }.forEach { header -> this.header(header.key, header.value) }
if (requestConfig.method in listOf(RequestMethod.PUT, RequestMethod.POST, RequestMethod.PATCH)) {
if (requestConfig.method in listOf(RequestMethod.PUT, RequestMethod.POST, RequestMethod.PATCH, RequestMethod.DELETE)) {
val contentType = (requestConfig.headers[HttpHeaders.ContentType]?.let { ContentType.parse(it) }
?: ContentType.Application.Json)
this.contentType(contentType)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ import {{packageName}}.auth.*
}
this.method = requestConfig.method.httpMethod
headers.filter { header -> !UNSAFE_HEADERS.contains(header.key) }.forEach { header -> this.header(header.key, header.value) }
if (requestConfig.method in listOf(RequestMethod.PUT, RequestMethod.POST, RequestMethod.PATCH)) {
if (requestConfig.method in listOf(RequestMethod.PUT, RequestMethod.POST, RequestMethod.PATCH, RequestMethod.DELETE)) {

@cubic-dev-ai cubic-dev-ai Bot Aug 3, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: This adds DELETE to the body-handling branch, so every DELETE request now sets Content-Type: application/json and calls setBody(body) even when there is no request body (body == null). For the common bodyless DELETE case this means the client now advertises a JSON content type where it previously sent none. Some servers treat a Content-Type on a bodyless DELETE differently (e.g. rejecting/415 on requests that shouldn't carry a body), so this is a client behavior change beyond the intended 'support DELETE request bodies' goal. Consider only setting the content type and body when a body is actually present, or scope the header emission to requests that carry a body, to keep bodyless DELETE requests unchanged while still enabling DELETEs that send a body.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/ApiClient.kt.mustache, line 169:

<comment>This adds DELETE to the body-handling branch, so every DELETE request now sets Content-Type: application/json and calls setBody(body) even when there is no request body (body == null). For the common bodyless DELETE case this means the client now advertises a JSON content type where it previously sent none. Some servers treat a Content-Type on a bodyless DELETE differently (e.g. rejecting/415 on requests that shouldn't carry a body), so this is a client behavior change beyond the intended 'support DELETE request bodies' goal. Consider only setting the content type and body when a body is actually present, or scope the header emission to requests that carry a body, to keep bodyless DELETE requests unchanged while still enabling DELETEs that send a body.</comment>

<file context>
@@ -166,7 +166,7 @@ import {{packageName}}.auth.*
             this.method = requestConfig.method.httpMethod
             headers.filter { header -> !UNSAFE_HEADERS.contains(header.key) }.forEach { header -> this.header(header.key, header.value) }
-            if (requestConfig.method in listOf(RequestMethod.PUT, RequestMethod.POST, RequestMethod.PATCH)) {
+            if (requestConfig.method in listOf(RequestMethod.PUT, RequestMethod.POST, RequestMethod.PATCH, RequestMethod.DELETE)) {
                 val contentType = (requestConfig.headers[HttpHeaders.ContentType]?.let { ContentType.parse(it) }
                     ?: ContentType.Application.Json)
</file context>
Fix with cubic

val contentType = (requestConfig.headers[HttpHeaders.ContentType]?.let { ContentType.parse(it) }
?: ContentType.Application.Json)
this.contentType(contentType)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,30 @@ import { type {{modelName}}, {{modelName}}FromJSONTyped, {{modelName}}ToJSON, {{
export function instanceOf{{classname}}(value: object): value is {{classname}} {
{{#vars}}
{{#required}}
{{#hasSanitizedName}}
if ((!('{{name}}' in value) && !('{{baseName}}' in value)) || (value['{{name}}'] === undefined && value['{{baseName}}'] === undefined)) return false;
{{/hasSanitizedName}}
{{^hasSanitizedName}}
if (!('{{name}}' in value) || value['{{name}}'] === undefined) return false;
{{/hasSanitizedName}}
{{#isEnum}}

@cubic-dev-ai cubic-dev-ai Bot Aug 3, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The new singleton-enum check in instanceOf runs for every required single-value enum property, without a nullable guard. In this codebase, required fields can legitimately be nullable ({{#isNullable}} is generated for both fromJSON and ToJSON), so a required nullable singleton-enum property whose payload value is null will now fail instanceOf (presence passes because null !== undefined, but value['kind'] !== 42 is true for null). That can cause valid objects to be rejected by oneOf dispatch and by generated validation. Consider guarding the enum-value comparison with {{#isNullable}} so that null is only rejected when the field is not nullable, or otherwise confirming the intended behavior for nullable singleton enums.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At modules/openapi-generator/src/main/resources/typescript-fetch/modelGeneric.mustache, line 34:

<comment>The new singleton-enum check in `instanceOf` runs for every required single-value enum property, without a nullable guard. In this codebase, required fields can legitimately be nullable (`{{#isNullable}}` is generated for both fromJSON and ToJSON), so a required nullable singleton-enum property whose payload value is `null` will now fail `instanceOf` (presence passes because `null !== undefined`, but `value['kind'] !== 42` is true for `null`). That can cause valid objects to be rejected by oneOf dispatch and by generated validation. Consider guarding the enum-value comparison with `{{#isNullable}}` so that `null` is only rejected when the field is not nullable, or otherwise confirming the intended behavior for nullable singleton enums.</comment>

<file context>
@@ -25,7 +25,30 @@ import { type {{modelName}}, {{modelName}}FromJSONTyped, {{modelName}}ToJSON, {{
+    {{^hasSanitizedName}}
     if (!('{{name}}' in value) || value['{{name}}'] === undefined) return false;
+    {{/hasSanitizedName}}
+    {{#isEnum}}
+    {{#allowableValues}}
+    {{#values}}
</file context>
Fix with cubic

{{#allowableValues}}
{{#values}}
{{#-first}}
{{#-last}}

@cubic-dev-ai cubic-dev-ai Bot Aug 3, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: OneOf branches with multi-value enum tags can still deserialize as the first structurally matching model because these guards emit no value check unless the enum is a singleton. The generated guard should test membership against every allowed enum value.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At modules/openapi-generator/src/main/resources/typescript-fetch/modelGeneric.mustache, line 38:

<comment>OneOf branches with multi-value enum tags can still deserialize as the first structurally matching model because these guards emit no value check unless the enum is a singleton. The generated guard should test membership against every allowed enum value.</comment>

<file context>
@@ -25,7 +25,30 @@ import { type {{modelName}}, {{modelName}}FromJSONTyped, {{modelName}}ToJSON, {{
+    {{#allowableValues}}
+    {{#values}}
+    {{#-first}}
+    {{#-last}}
+    {{#hasSanitizedName}}
+    {{#isString}}if (value['{{name}}'] !== '{{.}}' && value['{{baseName}}'] !== '{{.}}') return false;{{/isString}}
</file context>
Fix with cubic

{{#hasSanitizedName}}
{{#isString}}if (value['{{name}}'] !== '{{.}}' && value['{{baseName}}'] !== '{{.}}') return false;{{/isString}}

@cubic-dev-ai cubic-dev-ai Bot Aug 3, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Objects containing both wire and sanitized property names can be classified into the wrong OneOf branch when only the sanitized alias has the expected enum value; conversion then consumes the conflicting wire value. The guard should prioritize baseName when it is present, otherwise check name, rather than accepting either comparison.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At modules/openapi-generator/src/main/resources/typescript-fetch/modelGeneric.mustache, line 40:

<comment>Objects containing both wire and sanitized property names can be classified into the wrong OneOf branch when only the sanitized alias has the expected enum value; conversion then consumes the conflicting wire value. The guard should prioritize `baseName` when it is present, otherwise check `name`, rather than accepting either comparison.</comment>

<file context>
@@ -25,7 +25,30 @@ import { type {{modelName}}, {{modelName}}FromJSONTyped, {{modelName}}ToJSON, {{
+    {{#-first}}
+    {{#-last}}
+    {{#hasSanitizedName}}
+    {{#isString}}if (value['{{name}}'] !== '{{.}}' && value['{{baseName}}'] !== '{{.}}') return false;{{/isString}}
+    {{^isString}}if (value['{{name}}'] !== {{.}} && value['{{baseName}}'] !== {{.}}) return false;{{/isString}}
+    {{/hasSanitizedName}}
</file context>
Fix with cubic

{{^isString}}if (value['{{name}}'] !== {{.}} && value['{{baseName}}'] !== {{.}}) return false;{{/isString}}
{{/hasSanitizedName}}
{{^hasSanitizedName}}
{{#isString}}if (value['{{name}}'] !== '{{.}}') return false;{{/isString}}

@cubic-dev-ai cubic-dev-ai Bot Aug 3, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Singleton string enum values containing apostrophes or other escaped characters can produce invalid or incorrect generated TypeScript because {{.}} is inserted as an unescaped source literal. Iterating enumVars and using its pre-escaped value would preserve valid enum literals.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At modules/openapi-generator/src/main/resources/typescript-fetch/modelGeneric.mustache, line 44:

<comment>Singleton string enum values containing apostrophes or other escaped characters can produce invalid or incorrect generated TypeScript because `{{.}}` is inserted as an unescaped source literal. Iterating `enumVars` and using its pre-escaped `value` would preserve valid enum literals.</comment>

<file context>
@@ -25,7 +25,30 @@ import { type {{modelName}}, {{modelName}}FromJSONTyped, {{modelName}}ToJSON, {{
+    {{^isString}}if (value['{{name}}'] !== {{.}} && value['{{baseName}}'] !== {{.}}) return false;{{/isString}}
+    {{/hasSanitizedName}}
+    {{^hasSanitizedName}}
+    {{#isString}}if (value['{{name}}'] !== '{{.}}') return false;{{/isString}}
+    {{^isString}}if (value['{{name}}'] !== {{.}}) return false;{{/isString}}
+    {{/hasSanitizedName}}
</file context>
Fix with cubic

{{^isString}}if (value['{{name}}'] !== {{.}}) return false;{{/isString}}
{{/hasSanitizedName}}
{{/-last}}
{{/-first}}
{{/values}}
{{/allowableValues}}
{{/isEnum}}
{{/required}}
{{/vars}}
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export function {{classname}}ToJSONTyped(value?: {{classname}} | null, ignoreDis
switch (value['{{discriminator.propertyName}}']) {
{{#discriminator.mappedModels}}
case '{{mappingName}}':
return Object.assign({}, {{modelName}}ToJSON(value), { {{discriminator.propertyName}}: '{{mappingName}}' } as const);
return Object.assign({}, {{modelName}}ToJSON(value), { '{{discriminator.propertyBaseName}}': '{{mappingName}}' } as const);
{{/discriminator.mappedModels}}
default:
return value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,66 @@ public void testOneOfModelsImportNonPrimitiveTypes() throws IOException {
TestUtils.assertFileContains(testResponse, "import type { OptionThree } from './OptionThree'");
}

@Test(description = "Verify instanceOf checks discriminator value for single-value enums")
public void testInstanceOfChecksDiscriminatorValue() throws IOException {
File output = generate(Collections.emptyMap(), "src/test/resources/3_0/typescript-fetch/oneOf.yaml");

// OptionOne should check discriminator value
Path optionOne = Paths.get(output + "/models/OptionOne.ts");
TestUtils.assertFileExists(optionOne);
TestUtils.assertFileContains(optionOne, "value['discriminatorField'] !== 'optionOne'");

// OptionTwo should check discriminator value
Path optionTwo = Paths.get(output + "/models/OptionTwo.ts");
TestUtils.assertFileExists(optionTwo);
TestUtils.assertFileContains(optionTwo, "value['discriminatorField'] !== 'optionTwo'");

// TestA should NOT have a value check (foo is a plain string, not a single-value enum)
Path testA = Paths.get(output + "/models/TestA.ts");
TestUtils.assertFileExists(testA);
TestUtils.assertFileNotContains(testA, "value['foo'] !==");

// SnakeOptionOne: discriminator_field (snake_case baseName) vs discriminatorField (camelCase name)
// instanceOf should check both casings for field presence and discriminator value
Path snakeOptionOne = Paths.get(output + "/models/SnakeOptionOne.ts");
TestUtils.assertFileExists(snakeOptionOne);
TestUtils.assertFileContains(snakeOptionOne, "'discriminatorField' in value");
TestUtils.assertFileContains(snakeOptionOne, "'discriminator_field' in value");
TestUtils.assertFileContains(snakeOptionOne, "value['discriminatorField'] !== 'snakeOptionOne'");
TestUtils.assertFileContains(snakeOptionOne, "value['discriminator_field'] !== 'snakeOptionOne'");
// Also verify the non-enum required field checks both casings
TestUtils.assertFileContains(snakeOptionOne, "'someProperty' in value");
TestUtils.assertFileContains(snakeOptionOne, "'some_property' in value");

// DashedOptionOne: discriminator-field (dashed baseName) vs discriminatorField (camelCase name)
Path dashedOptionOne = Paths.get(output + "/models/DashedOptionOne.ts");
TestUtils.assertFileExists(dashedOptionOne);
TestUtils.assertFileContains(dashedOptionOne, "'discriminatorField' in value");
TestUtils.assertFileContains(dashedOptionOne, "'discriminator-field' in value");
TestUtils.assertFileContains(dashedOptionOne, "value['discriminatorField'] !== 'dashedOptionOne'");
TestUtils.assertFileContains(dashedOptionOne, "value['discriminator-field'] !== 'dashedOptionOne'");
TestUtils.assertFileContains(dashedOptionOne, "'someProperty' in value");
TestUtils.assertFileContains(dashedOptionOne, "'some-property' in value");

// Numeric singleton enum: value check must NOT quote the literal
Path numericModel = Paths.get(output + "/models/NumericSingletonEnumModel.ts");
TestUtils.assertFileExists(numericModel);
TestUtils.assertFileContains(numericModel, "value['kind'] !== 42");
TestUtils.assertFileNotContains(numericModel, "value['kind'] !== '42'");

// ToJSONTyped of discriminated oneOf must emit the wire-format discriminator key
// (propertyBaseName), not the camelCase TS property name
Path dashedDiscriminatorResponse = Paths.get(output + "/models/TestDashedDiscriminatorResponse.ts");
TestUtils.assertFileExists(dashedDiscriminatorResponse);
TestUtils.assertFileContains(dashedDiscriminatorResponse, "{ 'discriminator-field': 'dashedOptionOne' }");
TestUtils.assertFileContains(dashedDiscriminatorResponse, "{ 'discriminator-field': 'dashedOptionTwo' }");

Path snakeDiscriminatorResponse = Paths.get(output + "/models/TestSnakeCaseDiscriminatorResponse.ts");
TestUtils.assertFileExists(snakeDiscriminatorResponse);
TestUtils.assertFileContains(snakeDiscriminatorResponse, "{ 'discriminator_field': 'snakeOptionOne' }");
TestUtils.assertFileContains(snakeDiscriminatorResponse, "{ 'discriminator_field': 'snakeOptionTwo' }");
}

@Test(description = "Verify validationAttributes works with withoutRuntimeChecks=true")
public void testValidationAttributesWithWithoutRuntimeChecks() throws IOException {
Map<String, Object> properties = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,26 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/TestDiscriminatorResponse'
/test-snake-case-discriminator:
get:
operationId: testSnakeCaseDiscriminator
responses:
200:
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/TestSnakeCaseDiscriminatorResponse'
/test-dashed-discriminator:
get:
operationId: testDashedDiscriminator
responses:
200:
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/TestDashedDiscriminatorResponse'
components:
schemas:
TestArrayResponse:
Expand Down Expand Up @@ -93,4 +113,79 @@ components:
- "optionTwo"
type: string
required:
- discriminatorField
- discriminatorField
NumericSingletonEnumModel:
type: object
properties:
kind:
type: integer
enum:
- 42
required:
- kind
TestSnakeCaseDiscriminatorResponse:
discriminator:
propertyName: discriminator_field
mapping:
snakeOptionOne: "#/components/schemas/SnakeOptionOne"
snakeOptionTwo: "#/components/schemas/SnakeOptionTwo"
oneOf:
- $ref: "#/components/schemas/SnakeOptionOne"
- $ref: "#/components/schemas/SnakeOptionTwo"
SnakeOptionOne:
type: object
properties:
discriminator_field:
enum:
- "snakeOptionOne"
type: string
some_property:
type: string
required:
- discriminator_field
- some_property
SnakeOptionTwo:
type: object
properties:
discriminator_field:
enum:
- "snakeOptionTwo"
type: string
some_property:
type: string
required:
- discriminator_field
- some_property
TestDashedDiscriminatorResponse:
discriminator:
propertyName: discriminator-field
mapping:
dashedOptionOne: "#/components/schemas/DashedOptionOne"
dashedOptionTwo: "#/components/schemas/DashedOptionTwo"
oneOf:
- $ref: "#/components/schemas/DashedOptionOne"
- $ref: "#/components/schemas/DashedOptionTwo"
DashedOptionOne:
type: object
properties:
discriminator-field:
enum:
- "dashedOptionOne"
type: string
some-property:
type: string
required:
- discriminator-field
- some-property
DashedOptionTwo:
type: object
properties:
discriminator-field:
enum:
- "dashedOptionTwo"
type: string
some-property:
type: string
required:
- discriminator-field
- some-property
12 changes: 6 additions & 6 deletions samples/client/others/typescript-angular-v20/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading