Generating code/docs results in error
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
- Open studio.asyncapi.com
- Click on the three dots in the upper right corner, choose "generate code/docs"
- Pick f.e. "Markdown documentation", click "Generate"
Expected behavior
There should be no error message. Documentation should be generated.
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.
@aeworxet Please review my changes related to this line in the above PR
@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 server-api is not working anyway with v3, so I suggest to directly support generator it in studio. cc @Shurtu-gal / @KhudaDad414
@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.
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:
still relevant
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:
Hello folks, This should be solved soon, I have migrated server-api to CLI. And generator v3 is also now supported.