swagger-php icon indicating copy to clipboard operation
swagger-php copied to clipboard

Ignore other annotations

Open smallsung opened this issue 9 months ago • 3 comments

For other annotations outside of openapi, I have another program analysis. I don't want to construct these annotations.

smallsung avatar Mar 27 '25 02:03 smallsung

Just to check- we are talking PHP docblock annotations?

This is something to tell the underlying doctrine annotations library.

Another option would be to switch to using attributes for openapi; in the long run the way forward anyway.

DerManoMann avatar Mar 27 '25 07:03 DerManoMann

https://github.com/zircote/swagger-php/blob/0d35ed22dbc87d78740bb8941a8c7b53a060cded/src/Analysers/AttributeAnnotationFactory.php#L41-L48

My custom annotations do not inherit from OpenApi\Annotations\AbstractAnnotation, so do not need newInstance, process by the framework's annotation analyzer.

smallsung avatar Mar 27 '25 07:03 smallsung

@smallsung could you try https://github.com/zircote/swagger-php/pull/1748 to see if that works for you?

DerManoMann avatar Mar 27 '25 21:03 DerManoMann