Skip to content
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

Fix OpenAPI ServiceInfo validation error #155

Merged
merged 1 commit into from
Nov 24, 2020

Conversation

aniewielska
Copy link
Contributor

It looks like the indentation in the current spec is not right and causes OpenAPI spec error:

 curl -X GET "https://validator.swagger.io/validator/debug?url=https%3A%2F%2Fraw.githubusercontent.com%2Fga4gh%2Fworkflow-execution-service-schemas%2Fmaster%2Fopenapi%2Fworkflow_execution_service.openapi.yaml" -H "accept: application/yaml"

causes

messages:
- "attribute components.schemas.ServiceInfo.properties is not of type `object`"
schemaValidationMessages:
- level: "error"
  domain: "validation"
  keyword: "oneOf"
  message: "instance failed to match exactly one schema (matched 0 out of 2)"
  schema:
    loadingURI: "#"
    pointer: "/definitions/Components/properties/schemas/patternProperties/^[a-zA-Z0-9\\\
      .\\-_]+$"
  instance:
    pointer: "/components/schemas/ServiceInfo"
  required: null
  missing: null

whereas:

curl -X GET "https://validator.swagger.io/validator/debug?url=https%3A%2F%2Fraw.githubusercontent.com%2Faniewielska%2Fworkflow-execution-service-schemas%2Ffix-service-info%2Fopenapi%2Fworkflow_execution_service.openapi.yaml" -H "accept: application/yaml"

returns no validation messages.

@ruchim
Copy link
Collaborator

ruchim commented Oct 20, 2020

Curl Validation looks empty:

---
messages: null
schemaValidationMessages: null```

@ruchim
Copy link
Collaborator

ruchim commented Oct 20, 2020

👍

@ruchim
Copy link
Collaborator

ruchim commented Nov 3, 2020

@aniewielska -- while your changes look good -- is there any way you can make them off of develop branch, not master?

@aniewielska aniewielska changed the base branch from master to develop November 4, 2020 13:38
@aniewielska
Copy link
Contributor Author

I have changed the base of the PR. Is that enough or do you want me to rebase the PR as well?

@ruchim
Copy link
Collaborator

ruchim commented Nov 5, 2020

The trouble is that develop looks very very different from Master -- and I think it may not be relevant on develop: https://github.com/ga4gh/workflow-execution-service-schemas/blob/develop/openapi/components/schemas/ServiceInfo.yaml
What do you think?

@aniewielska
Copy link
Contributor Author

Right. It does not make sense for develop - I will just check that the restructuring of develop fixed the problem (probably it did). If so, if it is OK to live with an invalid spec in master until develop gets merged, there is nothing else to do than to close this PR.

@jaeddy
Copy link
Member

jaeddy commented Nov 5, 2020

Hey @aniewielska, @ruchim - sorry for the confusion. Given that develop might not be totally stable at this point, it probably makes more sense to treat this PR as a "hotfix" and merge into master (I realize I might have suggested a different approach when we were discussing earlier this week).

I'll be doing some additional cleanup and debugging around develop in the next couple weeks, and will make sure that this fix is addressed there as well.

@ruchim
Copy link
Collaborator

ruchim commented Nov 23, 2020

Bah of course -- I'm so sorry @aniewielska this is my fault. If you don't mind rebasing, lets get it back on Master and merged.

@aniewielska aniewielska changed the base branch from develop to master November 24, 2020 09:36
@aniewielska
Copy link
Contributor Author

I changed the base from the Github UI again to master - looks OK to me, but please double-check.

@ruchim ruchim merged commit 13f5682 into ga4gh:master Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants