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

Vacuum failing for component names that contain special characters #485

Open
ndimares opened this issue Apr 16, 2024 · 4 comments
Open

Vacuum failing for component names that contain special characters #485

ndimares opened this issue Apr 16, 2024 · 4 comments
Labels
libopenapi a bug in libopenapi

Comments

@ndimares
Copy link

The attached spec uses the following convention for its component names:

#/components/parameters/async_search.submit#wait_for_completion_timeout

that causes Vacuum to error with:

component '#/components/parameters/async_search.submit#wait_for_completion_timeout' does not exist in the specification

However the component in question does exist:

"async_search.submit#wait_for_completion_timeout": {
        "in": "query",
        "name": "wait_for_completion_timeout",
        "description": "Blocks and waits until the search is completed up to a certain timeout.\nWhen the async search completes within the timeout, the response won't include the ID as the results are not stored in the cluster.",
        "deprecated": false,
        "schema": {
          "$ref": "#/components/schemas/_types:Duration"
        },
        "style": "form"
      }, 

I think this is because the component name includes special characters.

Spec in question: openapi.json

@ndimares
Copy link
Author

@jamietanna FYI

@daveshanley
Copy link
Owner

daveshanley commented Apr 17, 2024

The problem is with libopenapi and the fragment, it's splitting off the fragment because of the second hash. libopenapi currently assumes that in any reference. There will be a single hash that denotes the root of the document, anything before it is the URI of the resource, and everything after is the path.

TLDR; The second hash denoting the fragment is the problem because the hash char is used as a delimiter.

@daveshanley daveshanley added the libopenapi a bug in libopenapi label Apr 17, 2024
@ndimares
Copy link
Author

Thanks for the explanation. Let me know if you want me to move this over to the libopenapi board. It's not an urgent issue as I don't think the Elastic team has any immediate use cases. Although hopefully they'll adopt some of the tooling down the road!

@daveshanley
Copy link
Owner

yeah, if you could move this issue over there it would be helpful as I can't fix the problem in vacuum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libopenapi a bug in libopenapi
Projects
None yet
Development

No branches or pull requests

2 participants