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

fix: tool file corrected #112

Merged
merged 1 commit into from
Jan 11, 2023
Merged

Conversation

akshatnema
Copy link
Member

Description
The .asyncapi-tool file is corrected according to the errors made while validating with the schema.

Signed-off-by: akshatnema <20bcs022@iiitdmj.ac.in>
@aeworxet
Copy link
Collaborator

This PR doesn't introduce a one property rename to simply align it's name with the existing schema like PR #109.
Phrase

If your code generator generates Python code, then specify Python, even if code
generator itself is written in JavaScript.

raised several questions:

  • the Bundler is able to generate JSON, YAML and stringified JSON, even though it's written in TypeScript. Shouldn't JSON, YAML and stringified JSON be listed then?
  • and, in this case, if some tool outputs result in several formats or languages, shouldn't there be introduced change to the schema
{
  "language": {
    "type": "array",
    "items": {
      "type": "string"
    }
  }
}

?

  • how to denote 'stringified JSON' in the .asyncapi-tool at all?

@derberg @magicmatatjahu

(due to holiday season, answers might delay up to after ~Jan 10, 2023)

@akshatnema
Copy link
Member Author

If your code generator generates Python code, then specify Python, even if code
generator itself is written in JavaScript.

@aeworxet The language parameter inside .asyncapi-tool file doesn't specify the code generated by the generator. Rather, it specifies the primary language with which the generator has been made. And it was decided before that we will have a single primary language for each tool, which is majorly being used to build the tool. Hence, it is a string, not an array.

@aeworxet
Copy link
Collaborator

Even if there was a decision made, but change was forgotten to be introduced into the schema, the https://github.com/asyncapi/website/blob/master/scripts/tools/tools-schema.json currently still reads in the description of the language property

If your code generator generates Python code, then specify Python, even if code
generator itself is written in JavaScript.

so I have to hit the brakes on this PR until senior engineers come to any agreement.

@magicmatatjahu
Copy link
Member

@akshatnema @aeworxet language refers to the language that you can use in the "runtime". That is, for generators it should be the language that the generator generates, but bundler even though it operates on YAML and JSON it does not mean that these are the target language, it's JS/TS because in this language it's written. It's a information if you can use given lib/script/api in your codebase :)

Copy link
Member

@derberg derberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

language is for people to know if they can integrate it in their code or not

@aeworxet
Copy link
Collaborator

Should the description https://github.com/asyncapi/website/blob/master/scripts/tools/tools-schema.json be altered then? Made more clear maybe?

@aeworxet
Copy link
Collaborator

/rtm

@asyncapi-bot asyncapi-bot merged commit ff7a27f into asyncapi:master Jan 11, 2023
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 0.3.10 🎉

The release is available on:

Your semantic-release bot 📦🚀

@magicmatatjahu
Copy link
Member

@akshatnema Next time please use chore:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants