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

Load Camel YAML schema in non root base path #109

Closed
lordrip opened this issue Sep 11, 2023 · 0 comments · Fixed by #118
Closed

Load Camel YAML schema in non root base path #109

lordrip opened this issue Sep 11, 2023 · 0 comments · Fixed by #118
Assignees
Labels
bug Something isn't working build Build and GitHub related issues help wanted Extra attention is needed source code editor Source Code Editor-related issues
Milestone

Comments

@lordrip
Copy link
Member

lordrip commented Sep 11, 2023

Context

Currently, kaoto-next is being deployed on GitHub pages under the following URL:

https://kaotoio.github.io/kaoto-next/

Since the DEFAULT_CATALOG_PATH is /camel-catalog, kaoto-next tries to load the catalog from:

https://kaotoio.github.io/

Steps to Reproduce the Bug or Issue

  1. Navigate to https://kaotoio.github.io/kaoto-next/
  2. Open the Source Code editor
  3. Notice monaco-editor warning that the schema couldn't be loaded

image

Screenshots or Videos

No response

Platform

  • OS: [Linux]
  • Browser: [Firefox]
@lordrip lordrip added the bug Something isn't working label Sep 11, 2023
@lordrip lordrip added build Build and GitHub related issues source code editor Source Code Editor-related issues help wanted Extra attention is needed labels Sep 11, 2023
@lordrip lordrip added this to the 0.1.0 - Smart Connectors' MVP milestone Sep 11, 2023
@lordrip lordrip self-assigned this Sep 12, 2023
lordrip added a commit to lordrip/kaoto that referenced this issue Sep 12, 2023
monaco-yaml requires to have a valid URI to fetch the appropiate schema
for the monaco editor and also it uses the URI to determine the schema
filename.

This commit uses the resolved URI from the fetch call when loading
the schema to leverage relative paths when applicable, otherwise, deploying
kaoto-next in environments like GitHub Pages in which the deployment
is not at the root path, it will fail since it will use the wrong
URI.

fixes: KaotoIO#109
lordrip added a commit that referenced this issue Sep 12, 2023
monaco-yaml requires to have a valid URI to fetch the appropiate schema
for the monaco editor and also it uses the URI to determine the schema
filename.

This commit uses the resolved URI from the fetch call when loading
the schema to leverage relative paths when applicable, otherwise, deploying
kaoto-next in environments like GitHub Pages in which the deployment
is not at the root path, it will fail since it will use the wrong
URI.

fixes: #109
@lhein lhein moved this to Backlog in Kanban Board Sep 21, 2023
@lhein lhein moved this from Backlog to Done in Kanban Board Sep 21, 2023
@lhein lhein modified the milestones: Smart Connectors' MVP, Feature Parity Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build Build and GitHub related issues help wanted Extra attention is needed source code editor Source Code Editor-related issues
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants