-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
feat: add server param ands support for conditions #55
Conversation
@derberg thank you for the example, but i thought about this and decide that such limitations could be not appropriate in some cases. My main point - current specification is not limited in paradigm "server per environment" or "one server per use" and i think this is not good approach to create such limitations in the template. I suggest to rewrite custom hook to conditionalFiles, but without usage of |
I think I recall the discussion but wasn't final advice to use variables instead of multiple servers? Otherwise, I think it will be difficult for you to keep compatibility in this template with other protocols. Most promoted approach to servers is to use them to define different environments, and without
You mean one asyncapi has two servers that use different protocols
It is of course not limited, but most common. You know, one thing is specification, and other is best practices 😉 |
Use variables to distinguishes environments, or also comment from @fmvilas
Yes |
@Tenischev you did not engage too much in discussion 😄 |
Different points of view regarding usage of several servers in the community... absolute free from spec side... |
@Tenischev I don't want to be pushy here, no worries. I'm just pointing out that without |
@derberg with the case to support several protocols in one AsyncAPI by one application is not a problem, as far as protocols compatible. I mean e.g. in Regarding server per environment, as i suggested before people could use variable in the URL to do it. But even if you would like to have a definition like server per environment, i would assume that in this case you will not have a different protocols in these servers 😀. And so, not the hook and condition files must be treated, the real place where |
@Tenischev in AsyncAPI you should not name channels like I didn't really get the rest of your message. How do you see it working with a single server and environments done with params and variables? You can have default variable sure, but somehow the user will need to pass the custom values for variables unless you're thinking about environment variables support. And no, users will most probably not specify different servers with different protocols, I don't see a use case, but that is not the point here. now, instead of supporting
|
This pull request has been automatically marked as stale because it has not had recent activity 😴 |
Hi @derberg , |
@Tenischev oh man, you're back! long time You are right, there is no one standard for different brokers, some have rules, some not, and this is why we should stick to one in the spec and then easily translate it to whatever is needed for a given broker. Spec is pretty clear here |
@derberg Ok, let's apply this, but please not mandatory. |
@Tenischev tricky part here is that if it is not mandatory, then users will have issues that |
@derberg i know, because of that this template has a special hook to remove unnecessary files. Thus, |
I think you got me lost here 😄 |
@Tenischev I think it is fair to say this PR should wait for asyncapi/spec#465. What do you think? I think everything else is just a workaround that replaces another workaround which is not how improvements should be done 😄 |
This pull request has been automatically marked as stale because it has not had recent activity 😴 |
Description
server
paramRelated issue(s)
See also asyncapi/generator#358