Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand on Response annotation warning message. #1683

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

kevinkopf
Copy link
Contributor

If a description or ref is missing in Response annotation, this improves the warning message, telling where exactly the missing attribute for the annotation is, saving up one's debugging time.

@kevinkopf
Copy link
Contributor Author

An example of how it would look in a Symfony project:

image

@DerManoMann
Copy link
Collaborator

I like the idea, however it might be good to handle all sorts of contexts - similar to https://github.com/zircote/swagger-php/blob/master/src/Processors/OperationId.php#L54-L72

In fact, there enums are missing too!

I suppose the Context class could have a method that contstructs these strings? Something like sourceId(): string or similar.

@kevinkopf
Copy link
Contributor Author

I went over the code and noticed that Context already has a method called getDebugLocation, which basically does what we need.

I updated my PR to reflect the change. Attaching an example message:
image

I don't have time to go over all the warning/error messages, I'll update them one by one if/when I encounter them.

@DerManoMann
Copy link
Collaborator

Oops

@DerManoMann DerManoMann merged commit 7497d3b into zircote:master Jan 6, 2025
21 checks passed
@DerManoMann
Copy link
Collaborator

Thanks @kevinkopf

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.

2 participants