Skip to content

fix: update outdated spec path and CLI installation details #3926

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

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions components/GeneratorInstallation.tsx
Original file line number Diff line number Diff line change
@@ -22,9 +22,11 @@ interface GeneratorFlags {
*/
export default function GeneratorInstallation() {
const [template, setTemplate] = useState<string>('@asyncapi/html-template@3.0.0');
// By default we will have output folder flag so its set here.
// By default, we will have output folder flag set here.
const [params, setParams] = useState<string>('-o example --use-new-generator');
const [specPath, setSpecPath] = useState<string>('https://bit.ly/asyncapi');
const [specPath, setSpecPath] = useState<string>(
'https://raw.githubusercontent.com/asyncapi/spec/refs/heads/master/examples/streetlights-kafka-asyncapi.yml'
);

const generatorflags = generatorflagList as GeneratorFlags;

@@ -37,9 +39,9 @@ export default function GeneratorInstallation() {
if (templateName && generatorflags[templateName]) {
const templateBasedJSON = generatorflags[templateName];

// options are generated from generator-templates.json
// Options are generated from generator-templates.json
// and flags are fetched from generator-flags.json,
// so it is mandatory to have check in case if any misses the option in future
// so it is mandatory to check in case any misses the option in the future.

if (templateBasedJSON) {
setParams(templateBasedJSON.flag);
2 changes: 1 addition & 1 deletion pages/tools/cli.tsx
Original file line number Diff line number Diff line change
@@ -155,7 +155,7 @@ export default function CliPage() {
<div className='space-y-5'>
<div>
<Paragraph typeStyle={ParagraphTypeStyle.md} className='mb-4'>
Create a new AsyncAPI file
Create a new AsyncAPI project, specification files, or templates for clients and applications
</Paragraph>
<CodeBlock
language='generator-cli'
4 changes: 2 additions & 2 deletions public/locales/en/tools.json
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
"docsButton": "View Docs",
"installingTitle": "Installing",
"exampleTitle": "Example",
"exampleDescription": "Create a new AsyncAPI file",
"exampleDescription": "Create a new AsyncAPI project, specification files, or templates for clients and applications",
"featuresTitle": "Features",
"featuresDescription": "Use the AsyncAPI CLI tool to help you create, develop, and maintain your AsyncAPI files.",
"features": {
@@ -22,4 +22,4 @@
"open-source.description": "All our tools are open source, feel free to contribute new commands or help evolve our existing ones."
}
}
}
}