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

Move x-remoteServers Configuration to glee.config.(js|ts) #601

Closed
KhudaDad414 opened this issue Nov 23, 2023 · 5 comments
Closed

Move x-remoteServers Configuration to glee.config.(js|ts) #601

KhudaDad414 opened this issue Nov 23, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@KhudaDad414
Copy link
Member

Context

Currently, Glee specifies which servers are remote by using the x-remoteServers attribute in the AsyncAPI file. It is proposed to move this configuration to the glee.config.(js|ts) file, as this is a configuration specific to Glee, rather than to the API itself.

Current Implementation

In the current setup, the AsyncAPI file contains the x-remoteServers attribute:

x-remoteServers:
  - httpbin.org

Proposed Implementation

The new configuration would be part of the glee.config.(js|ts) file, making it more intuitive and aligned with other Glee configurations:

export default async function () {
  return {
    glee: { // Glee core configurations
      remoteServers: ["httpbin.org"],
      // ... other configurations
    },
    // ... other configurations...
  }
}
@KhudaDad414 KhudaDad414 added the enhancement New feature or request label Nov 23, 2023
@afzal442
Copy link
Contributor

afzal442 commented Dec 2, 2023

Hi, is this related to code change to support the outcome and let logic do the work or just moving the config?

@KhudaDad414
Copy link
Member Author

@afzal442 the logic works as explained. it parses it from the AsyncAPI file.

const remoteServers = parsedAsyncAPI.extensions().get('x-remoteServers')?.value()

we need to first change the code logic to get it from the config file and update the documentation as well.

@afzal442
Copy link
Contributor

afzal442 commented Dec 5, 2023

I think it is going to be tricky for me as it has to do sth like extracting the value from glee.confile file.

@ayush3160
Copy link

@KhudaDad414 , I would like to work on this issue.

@KhudaDad414
Copy link
Member Author

During a recent discussion, it is clear that this specific piece of info is important to be where it is now.
why? At last, glee should be able to function only when it has the asyncapi.yaml file and the operation functions.
since this piece of information is critical for Glee to run, If we put it in the config file, then the config file also becomes a necessity and Glee has to rely on the config file as well, which is impossible in other environments like browser.

I suggest for now we keep it where it is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants