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

Conversion fails if there is a '#' in the url of a REST query #441

Closed
juliandm opened this issue Jan 23, 2022 · 4 comments
Closed

Conversion fails if there is a '#' in the url of a REST query #441

juliandm opened this issue Jan 23, 2022 · 4 comments

Comments

@juliandm
Copy link

Describe the bug
I was trying to run the cli on the aws s3 api schema but got following error:

OpenAPI-to-GraphQL creation event error: expected '/{Bucket}/{Key}#uploadId' not to contain '#' (false negative fail)

To Reproduce
Steps to reproduce the behavior:

  1. Download the raw aws s3 api schema https://raw.githubusercontent.com/APIs-guru/openapi-directory/main/APIs/amazonaws.com/s3/2006-03-01/openapi.yaml
  2. save it in a file test.yaml
  3. run openapi-to-graphql test.yaml
  4. See error

Expected behavior
I expect it to parse

@Alan-Cha
Copy link
Collaborator

@juliandm This seems to be a good catch. I will try to take a look at this later today.

@Alan-Cha
Copy link
Collaborator

Alan-Cha commented Feb 4, 2022

I took a look at this. This seems to be a problem with our OAS validator oas-validator. This is more evidence that we should switch to a different OAS validator.

Related: #410, #334

@Alan-Cha
Copy link
Collaborator

Alan-Cha commented Feb 4, 2022

Huh, the interesting thing is that the maintainer of this OAS is also a maintainer of oas-validator.

@Alan-Cha
Copy link
Collaborator

Alan-Cha commented Feb 4, 2022

I think this might be invalid according to OAS.

https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#path-templating

The value for these path parameters MUST NOT contain any unescaped "generic syntax" characters described by RFC3986: forward slashes (/), question marks (?), or hashes (#).

It seems like paths should not contain unescaped "#". As a result, I do not expect this should work. I will close this issue for now.

@Alan-Cha Alan-Cha closed this as completed Feb 4, 2022
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

No branches or pull requests

2 participants