Open helmut-hoffer-von-ankershoffen opened 5 years ago
It's not really a bug actually, it is due to how api-platform is supported : we merge the documentation api-platform generates and we don't modify it directly.
I'm not sure it's possible to improve this point as we can't alter their docs generation without duplicating a lot of code from their repository.
How is that not a bug? It's even worse because it makes the bundle unusable without some own code to somehow get around that if you don't want useless or even sensitive data displayed to user. There isn't even a way to turn off API Platform merge, is there? Only with compiler pass I guess
@GuilhemN Any suggestions/workarounds here? or it's only to totally disable api-plaform docs and write our own OA docs
Little more context, from what I understand: @Area
annotation/attributes are not respect nor is any path filtering done that would be defined in the areas
config for nelmio_api_doc
.
I don't know what the right solution is here as API Platform itself has OpenAPI support: https://api-platform.com/docs/core/openapi/ with some suggestions on how one can modify it.
Thanks for the ref! It seems a lot has changed in ApiPlatform since I created this bundle.
From what I see to achieve the desired result we would need to hook into https://github.com/api-platform/core/blob/main/src/OpenApi/Factory/OpenApiFactory.php#L136, this is not feasible directly, so I see two solutions:
Documentation gathered via the ApiPlatformDescriber does not respect areas or path constraints
Is this a known issue and is there a workaround?