-
-
Notifications
You must be signed in to change notification settings - Fork 840
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
OpenApi\Analysis::getSchemaForSource(): Argument #1 ($fqdn) must be of type string, array given, #2152
Comments
same issue, any solutions ? |
I got the same issue when upgrading from Api platform 2.7 to ApiPlatform 3.2. Looking forward to finding a solution here.
We are using these versions:
There is an issue in zircote/swagger-php which got closed as it was deemed as unrelated to their project: zircote/swagger-php#1464 Looking forward to finding a solution here |
Maybe we can have temporary solution by introducing configuration like So instead in DependencyInjection/NelmioApiDocExtension.php:170-173 // ApiPlatform support
if (isset($bundles['ApiPlatformBundle']) && class_exists('ApiPlatform\Documentation\Documentation')) {
$loader->load('api_platform.xml');
} Would be nice not to force api platform integration // ApiPlatform support
if ($config['enable_api_platform'] && isset($bundles['ApiPlatformBundle']) && class_exists('ApiPlatform\Documentation\Documentation')) {
$loader->load('api_platform.xml');
} I know this doesn't fix the problem, but at least having this option we can have separate UIs that work, until the problem is fixed. My project use case is that v1 is under nelmio api docs , and we are moving to v2 using api-platform, both docs are rendered separately. So now only v2 renders correctly while v1 gets this exception too... And if I comment out these lines, v1 and v2 docs are rendered without any issues. |
I have a work in progress PR open at zircote/swagger-php zircote/swagger-php#1502. This happens because Api platform 3.2 creates documentation according to openapi spec 3.1.0 which allows types to be defined as a string or a list of types. A list of types causes a |
Thanks @DjordyKoert for you feedback 🙏 |
zircote/swagger-php#1502 has been merged so a simple update of swagger-php on your project should fix the issue 😄 |
Thanks @DjordyKoert But i don't think it's related 🤔 |
Hi there,
I have a simple symfony 6.3 project with php 8.2 Api platform 3.2 and Nelmio api doc.
Then i generate a simple Post entity with title and description but when i want to access nelmio doc, i have the following error.
OpenApi\Analysis::getSchemaForSource(): Argument #1 ($fqdn) must be of type string, array given,
After investigate, i've found that if i describe manually my operation from api platform, it works well :
But then here we go, i set the
new GetCollection()
attribute, and the error appear again :/I can't figure out the problem :'(
Here is my require part in composer.json file
The text was updated successfully, but these errors were encountered: