Giter Club home page Giter Club logo

Comments (13)

miguelrk avatar miguelrk commented on August 19, 2024 1

Just to keep track, here are some isomorphic runtime libraries (not codegen) which allow dynamic client creation within JS/TS for OpenAPI:

Something similar is what I was intending for AsyncAPI with this issue, here an example from openapi-client-axios:

import OpenAPIClientAxios from 'openapi-client-axios'

const api = new OpenAPIClientAxios({ definition: 'https://example.com/api/openapi.json' })
api.init()

async function createPet() {
  const client = await api.getClient()
  const res = await client.createPet(null, { name: 'Garfield' })
  console.log('Pet created', res.data)
}

from glee.

fmvilas avatar fmvilas commented on August 19, 2024 1

And in a similar fashion but from the server point of view: https://github.com/anttiviljami/openapi-backend.

from glee.

fmvilas avatar fmvilas commented on August 19, 2024 1

Yeah, I can work on other stuff first. I'm actually adding tests now so it may help you refactor the code too.

from glee.

github-actions avatar github-actions commented on August 19, 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 glee.

miguelrk avatar miguelrk commented on August 19, 2024

According to comments in this slack thread, Glee already implements the functionality to generate clients and servers internally.

Some discussed options for making client/server generation code available for dynamic generation of clients/servers were:

  1. Export to standalone (isomorphic) library and publish as npm package, for Glee to consume as dependency
  2. Expose client/server generation code within the Glee framework, to be consumed as a library (no additional package)

Useful comments by @fmvilas:

  • this functionally is somehow baked into Glee right now
  • so far, Glee can generate MQTT clients and WebSocket servers
  • making this isomorphic will be very difficult
  • still, only HTTP and WebSocket clients are usually used

from glee.

fmvilas avatar fmvilas commented on August 19, 2024

@miguelrk would you be willing to open a PR for this issue? I'm happy to guide you as needed.

from glee.

miguelrk avatar miguelrk commented on August 19, 2024

Yes! I'd be glad to, just need to finish some other stuff first. Mind keeping this open for a while? 😀

from glee.

github-actions avatar github-actions commented on August 19, 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 glee.

github-actions avatar github-actions commented on August 19, 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 glee.

fmvilas avatar fmvilas commented on August 19, 2024

@miguelrk are you still interested in contributing this?

from glee.

miguelrk avatar miguelrk commented on August 19, 2024

Hey! I'm still interested but don't really have the time at the moment. Feel free to close this if you want

from glee.

fmvilas avatar fmvilas commented on August 19, 2024

I think it's still an interesting concept to explore. Maybe someone else wants to pick it up?

from glee.

github-actions avatar github-actions commented on August 19, 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 glee.

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.