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

Generating code/docs results in error #1144

Open
haukepauke opened this issue Sep 30, 2024 · 5 comments
Open

Generating code/docs results in error #1144

haukepauke opened this issue Sep 30, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@haukepauke
Copy link

haukepauke commented Sep 30, 2024

Describe the bug

When trying to generate a "HTML website" or "Markdown documentation" for the default project "Streetlights Kafka API 1.0.0" or any other project file an error message is shown: "Failed to generate."

This behaviour is similar for the version running on https:/studio.asyncapi.com and on a checkout of the master branch, running it locally (localhost:3000).

Browser console shows the error:

POST http://localhost:3001/api/v1/generate net::ERR_CONNECTION_REFUSED (Chromium, Version 129.0.6668.70, Linux, 64 Bit)

Quellübergreifende (Cross-Origin) Anfrage blockiert: Die Gleiche-Quelle-Regel verbietet das Lesen der externen Ressource auf http://localhost:3001/api/v1/generate. (Grund: CORS-Anfrage schlug fehl). Statuscode:
(Firefox, 130.0.1, Linux, 64-Bit).

How to Reproduce

  1. Open studio.asyncapi.com
  2. Click on the three dots in the upper right corner, choose "generate code/docs"
  3. Pick f.e. "Markdown documentation", click "Generate"

grafik

Expected behavior

There should be no error message. Documentation should be generated.

@haukepauke haukepauke added the bug Something isn't working label Sep 30, 2024
Copy link

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@catosaurusrex2003
Copy link
Contributor

@aeworxet Please review my changes related to this line in the above PR

@aeworxet
Copy link
Contributor

aeworxet commented Oct 1, 2024

@catosaurusrex2003

Situation with generator and server-api is complicated in general:

#1094 (comment)

we should remove the dependency with https://github.com/asyncapi/server-api in the NextJS version of studio as this repository might be deprecated soon.

#1094 (comment)

KhudaDad414 suggests the opposite, to stick with server-api.

#661 (comment)

Investigaton that showed that the server's part will at some point MAYBE migrate to CLI. Maybe not.

So there is no a one-byte solution to this issue currently.

@Amzani, can you please share what the current thoughts are on generator and server-api (I see that #1110 is in the backlog of https://github.com/orgs/asyncapi/projects/39, but it's a bit stalled?)

Maybe someone else should be tagged in this issue also?

@Amzani
Copy link
Collaborator

Amzani commented Oct 2, 2024

@aeworxet server-api is not working anyway with v3, so I suggest to directly support generator it in studio.
cc @Shurtu-gal / @KhudaDad414

@Shurtu-gal
Copy link
Collaborator

@aeworxet server-api is not working anyway with v3, so I suggest to directly support generator it in studio.
cc @Shurtu-gal / @KhudaDad414

Yeah this is the natural next step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

5 participants