You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 25, 2024. It is now read-only.
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
ThisSchema.additionalProperties = ThisSchema causes StackOverflowError
When an object schema defines additionalProperties as itself we get a StackOverflowError
Sample spec
Player:
type: object
description: a model that includes a self reference this forces properties and additionalProperties
to be lazy loaded in python models because the Player class has not fully loaded when defining
properties + additionalProperties
properties:
name:
type: string
enemyPlayer:
$ref: '#/components/schemas/Player'
additionalProperties:
$ref: '#/components/schemas/Player'
This bug probably also exists for ArrayModels containing themself in items
openapi-generator version
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
Related issues/PRs
Suggest a fix
The overflow happens when creating example values for schemas. Build in the ability to detect a cycle where we return to a previously visited schema and and halt in teExampleValueRecursive
Bug Report Checklist
Description
ThisSchema.additionalProperties = ThisSchema causes StackOverflowError
When an object schema defines additionalProperties as itself we get a StackOverflowError
Sample spec
This bug probably also exists for ArrayModels containing themself in items
openapi-generator version
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
Related issues/PRs
Suggest a fix
The overflow happens when creating example values for schemas. Build in the ability to detect a cycle where we return to a previously visited schema and and halt in teExampleValueRecursive