studio icon indicating copy to clipboard operation
studio copied to clipboard

Generating code/docs results in error

Open haukepauke opened this issue 1 year ago • 5 comments

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 avatar Sep 30 '24 15:09 haukepauke

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.

github-actions[bot] avatar Sep 30 '24 15:09 github-actions[bot]

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

catosaurusrex2003 avatar Oct 01 '24 17:10 catosaurusrex2003

@catosaurusrex2003

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

https://github.com/asyncapi/studio/pull/1094#issuecomment-2120038356

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.

https://github.com/asyncapi/studio/pull/1094#issuecomment-2134983109

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

https://github.com/asyncapi/studio/issues/661#issuecomment-2163496500

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 https://github.com/asyncapi/studio/issues/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?

aeworxet avatar Oct 01 '24 20:10 aeworxet

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

Amzani avatar Oct 02 '24 11:10 Amzani

@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.

Shurtu-gal avatar Oct 02 '24 12:10 Shurtu-gal

This issue has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart:

github-actions[bot] avatar Jan 31 '25 00:01 github-actions[bot]

still relevant

catosaurusrex2003 avatar Jan 31 '25 14:01 catosaurusrex2003

This issue has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart:

github-actions[bot] avatar Jun 01 '25 00:06 github-actions[bot]

Hello folks, This should be solved soon, I have migrated server-api to CLI. And generator v3 is also now supported.

Shurtu-gal avatar Sep 18 '25 06:09 Shurtu-gal