Skip to content

Support webhooks in --openapi-scope #2059

@stephanschielke

Description

@stephanschielke

OpenAPI Documents can have a webhooks root element instead of paths or component:

image
https://spec.openapis.org/oas/latest.html#oasWebhooks

It usually contains path-like items with operations that have a requestBody which have content schema attribute.
It's the same schema object that already is getting utilised for schema and paths openapi-scopes when used with --openapi-scope.

Here is an example OpenAPI JSON (for Zoom Account Webhooks)

It would be nice to extend the currently available openapi-scopes to include webhooks to generate pydantic model or data classes based on the schema information found.

Alternatively, it might be possible to merge the objects under paths with webhooks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions