Open jskoll opened 2 years ago
Thanks for documenting this issue so clearly. That's an interesting change.
Unfortunately, there's upstream changes (on the Looker API server) that would need to be changed to address this.
More background is provided below, but what is the goal that this validation error is blocking for you? Is some language generator failing now?
These spec files are pulled directly from the Looker server, which provides only Swagger 2.x specs with some custom Looker-specific attributes which are then converted by the spec converter we wrote to make it compatible OpenAPI 3.x, so your PR would get overwritten whenever we pull the latest spec. Treat them as read-only. So there's changes that need to be made upstream from this repository for Swagger 2.x to pass. Do you know when this validation issue started appearing? The original work on this spec conversion had not validation errors so I'm curious.
I'm not sure when this issue first appeared. I noticed it the day I created the issue which was the first day I started looking a this repo.
I was trying to use the spec file with the openapi-generator to create php files. It was failing with that creation and creating some invalid models. I can provide more details on those specific errors later if you'd like.
I was hoping to raise this issue again since we have an upcoming deadline to upgrade from Looker API v3.1 to v4.0 by June. It would be really helpful if the Looker dev team could address this as soon as possible.
Our application heavily relies on Looker's API for scheduled plans, so resolving this issue is critical for us. If there are any updates or workarounds that you could provide, we would greatly appreciate it.
Thanks a ton for your attention to this matter. We're eagerly awaiting your response and looking forward to getting this sorted out before the June deadline.
@alyceJake you can use swagger-codegen
to generate SDK for API 4.0 https://github.com/swagger-api/swagger-codegen#getting-started
To use yarn legacy php
You can turn off the spec validation and complete the PHP gen by adding skip validation to the call to generate PHP
with the added --skip-validate-spec
below.
return run('openapi-generator-cli', [
'generate',
'--skip-validate-spec',
'-i',
fileName,
'-g',
language,
'-o',
apiPath,
'--enable-post-process-file',
options,
])
When running validate on the 4.0 spec files it fails with the error
This error occurs for both the swagger 2 and oas files.
I am using v5.4.0 of the generator
This is the error can be fixed by moving the
additionalProperties
underschema
I can create a PR for this fix if this issue is accepted