Skip to content

Conversation

alli83
Copy link
Contributor

@alli83 alli83 commented Oct 6, 2023

Q A
Branch? main
Tickets
License MIT
Doc PR

Possible to configure a webhook via an attribute:

`
#[ApiResource(operations: [

new Post(openapi: new Webhook(name: 'a cute name')
)),
new Get(openapi: new Webhook(
    name: 'a cute name',
    pathItem: new PathItem(
        get: new Operation(
            summary: 'Something else here',
            description: 'Something else here for example',
        ),
    )
)),

]
)]`
and generate documentation

@alli83 alli83 force-pushed the openapi-webhook branch 3 times, most recently from 235a006 to 2398d0e Compare October 6, 2023 12:23

if ($path) {
if (!$pathItem && $path) {
$pathItem = $paths->getPath($path) ?: new PathItem();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will update: just $path should be enough

@soyuka
Copy link
Member

soyuka commented Oct 27, 2023

Nice! Do you think we could add a functional test to features/openapi/docs.feature with a webhook?

@alli83 alli83 force-pushed the openapi-webhook branch 2 times, most recently from d657fc4 to 89432a0 Compare December 18, 2023 13:27
Copy link

stale bot commented Feb 16, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Feb 16, 2024
@stale stale bot closed this Feb 24, 2024
@dunglas dunglas reopened this Mar 20, 2024
@dunglas dunglas removed the stale label Mar 20, 2024
@soyuka soyuka merged commit 125f2ce into api-platform:main Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants