-
Notifications
You must be signed in to change notification settings - Fork 6
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
attempting to register produces strange validation error messages about regexes #1
Comments
Hi Chris. |
@cmungall, I confirm what @micheldumontier said, this error msg is just indicating that "swagger" is not a recognized field in OAS3. It needs to be converted from OpenAPI v2 to v3 first. |
Thanks. My main point here is that is that it is more difficult than it should be for people to register their API. Do you have any logs showing how many people come to the site to try to register and are not successful? I am committed to using SmartAPI and I find it difficult. I think if you want to try and bring in people who don't have any requirement to register it needs to be easier. Specifically
The last point is important. I was able to fix the majority of the errors the swagger editor pointed out. However, some are quite obscure and may be the result of issues in the underlying framework used. None of them are of any consequence from the point of view of registration with SmartAPI or from the ability to use a wide variety of OpenAPI/Swagger conformant tooling such as code generators and the main swagger UI. Why not simply accept any OpenAPI v2 or v3 document that is syntactically well formed and has a meaningful subset of metadata fields filled in. You can provide a dashboard in the registry that shows which APIs are failing which conformance tests, but you will still have them registered. |
@cmungall Thanks for the feedback.
|
@cmungall @micheldumontier my comments below:
|
I'm trying to register https://api.monarchinitiative.org/api/swagger.json
I get this, which is fairly opaque:
OAS3] '': 'basePath', 'consumes', 'definitions', 'produces', 'responses', 'swagger' do not match any of the regexes: '^x-'
Because I'm somewhat familiar with OpenAPI I know this is something to do with
x-
fields, but I'm still at a loss as to how to change my flask code to fix this (and I don't want to have to keep a separate description in sync). And I'm relatively experienced, others coming to this will be more puzzled.Ideally this would link to a FAQ, but I think overall it would be better if SmartAPI were more tolerant. What does it matter if there are some additional fields it doesn't know about? Why should this block registration?
I know we have a current entry for the monarch biolink instance which comes from here https://github.com/NCATS-Tangerine/translator-api-registry/blob/master/biolink/openapi.yml
but this looks like it has been heavily tweaked from the source, and in the intervening time we have added new routes
The text was updated successfully, but these errors were encountered: