Coder Social home page Coder Social logo

Comments (8)

magicmatatjahu avatar magicmatatjahu commented on July 28, 2024 1

ParserJS is a single instance lib so we should only create parser.ta file with that code:

import { parse, registerSchemaParser } from '@asyncapi/parser';
import openapiSchemaParser from '@asyncapi/openapi-schema-parser';
import avroSchemaParser from '@asyncapi/avro-schema-parser';
import ramlDtSchemaParser from '@asyncapi/raml-dt-schema-parser';

registerSchemaParser(openapiSchemaParser);
registerSchemaParser(avroSchemaParser);
registerSchemaParser(ramlDtSchemaParser);

export { parse } 

and reuse that parse function in other places.

from cli.

github-actions avatar github-actions commented on July 28, 2024

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.

from cli.

jonaslagoni avatar jonaslagoni commented on July 28, 2024

Related parser plugin: https://github.com/asyncapi/raml-dt-schema-parser

from cli.

derberg avatar derberg commented on July 28, 2024

hint for whoever will work on this:

from cli.

starlightknown avatar starlightknown commented on July 28, 2024

hello, wanted to confirm changes before I make a PR @derberg :
image

from cli.

derberg avatar derberg commented on July 28, 2024

@starlightknown omg, so sorry, I just noticed this by accident when I was doing a review of good first issues 😞

please always open a PR when you have something already, just mark it as draft. It is really easy to miss some comment in some issue. Still not a good excuse 😄 sorry 😞

The changes you suggest are good, but this is not the only place where we need it. The fetch-asyncapi-example.js is a script that we run during build. There is also a need to make a change in the CLI itself. Now, when I look at the code now, months after creation of this issue, things are getting more complicated IMHO, it is not that trivial anymore because, I see that in code we user parser directly already in diff.ts, validate.ts and models.ts. So the change you have in the screenshot would have to be duplicated in 3 different files, which already rings a bell that this is not the best way to do it. IMHO to solve this issue, a wrapper around parser should be introduced, and diff.ts, validate.ts and models.ts should be refactored to use the new wrapper.

@boyney123 @magicmatatjahu @Souvikns thoughts?

from cli.

github-actions avatar github-actions commented on July 28, 2024

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

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 ❤️

from cli.

asyncapi-bot avatar asyncapi-bot commented on July 28, 2024

🎉 This issue has been resolved in version 0.29.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

from cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.