-
Notifications
You must be signed in to change notification settings - Fork 149
Open
Labels
area/generatorAffects: plugin, CLI, config file.Affects: plugin, CLI, config file.kind/usabilityUsability of generated code, ergonomics.Usability of generated code, ergonomics.status/needs-designNeeds further discussion and a concrete proposal.Needs further discussion and a concrete proposal.🆕 semver/minorAdds new public API.Adds new public API.
Milestone
Description
When all types are inline, you get consistent names for all operations:
Operations.<operationID>.Input.PathOperations.<operationID>.Input.QueryOperations.<operationID>.Input.HeadersOperations.<operationID>.Input.CookiesOperations.<operationID>.Input.Body
And similar for Operations.<operationID>.Output.
When using reusable types for requestBody, parameter, and response, however, these can point directly to e.g. Components.RequestBodies.Foo, etc, which breaks the symmetry.
Consider emitting a typealias here that would make all the names predictable, e.g.
enum Operations {
enum <operationId> {
struct Input {
typealias Body = Components.RequestBodies.Foo
}
}
}Metadata
Metadata
Assignees
Labels
area/generatorAffects: plugin, CLI, config file.Affects: plugin, CLI, config file.kind/usabilityUsability of generated code, ergonomics.Usability of generated code, ergonomics.status/needs-designNeeds further discussion and a concrete proposal.Needs further discussion and a concrete proposal.🆕 semver/minorAdds new public API.Adds new public API.