Skip to content

OpenApi.fromApi exposes shared mutable state #6330

Description

@gcanti

OpenApi.fromApi returns the same cached OpenAPISpec instance for repeated calls with the same API.

Because OpenAPISpec is mutable, any caller can modify the cached object and silently change the specification seen by every subsequent caller. The generated output therefore depends on prior external mutations.

Metadata

Metadata

Assignees

Labels

4.0bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions