-
-
Notifications
You must be signed in to change notification settings - Fork 582
Closed
Description
As suggested in my comment at #236 (comment), I'd prefer to export an operations
interface, besides paths
and components
.
Instead of setting the types for each operation in the paths
object, I'd reference an operation
key using the operations ID`. In the example of the GitHub OpenAPI schema,
export interface paths {
"/": {
/**
* Get Hypermedia links to resources accessible in GitHub's REST API
*/
get: {
// ...
}
}
}
would result in
export interface paths {
"/": {
get: operations["meta/root"]
}
}
export interface operations {
/**
* Get Hypermedia links to resources accessible in GitHub's REST API
*/
"meta/root": {
// ...
}
}
operationId
s are great to generate SDK methods. Having the operation
export with direct access to operation types would make it easier to access the operation types for parameters and responses
Metadata
Metadata
Assignees
Labels
No labels