spec icon indicating copy to clipboard operation
spec copied to clipboard

Extending `Server.variables` field type

Open char0n opened this issue 2 years ago • 2 comments

As of version 2.4.0, Server Variable Object can now be defined in Components.serverVariables fixed field, which indicates re-usability. Here is an example that I've took from AsyncAPI 2.4.0 release article.

image

Unfortunately according to the 2.4.0 version of the specification, Server.variables field doesn't allow to use Reference Object:

image

In order to remedy this issue, we have to extend the Server.variables type to Map[string, [Server Variable Object | Reference Object]].


Given we can now define re-usable Server Variable Objects in Components.serverVariables field, we cannot reuse them in any way in 2.4.0 version of the spec.

Ref https://github.com/asyncapi/spec/issues/707

char0n avatar May 03 '22 08:05 char0n

I've issued a PR that remedies the situation and would probably suggest to go for 2.4.1 as soon as possible.

char0n avatar May 03 '22 08:05 char0n

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

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 :heart:

github-actions[bot] avatar Sep 01 '22 00:09 github-actions[bot]

:tada: This issue has been resolved in version 3.0.0-next-major-spec.2 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

asyncapi-bot avatar Sep 29 '22 06:09 asyncapi-bot

:tada: This issue has been resolved in version 2.5.0-next-spec.5 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

asyncapi-bot avatar Jan 31 '23 09:01 asyncapi-bot

Recent comments about the release from the bot were added by mistake. More details in https://github.com/asyncapi/spec/issues/899

derberg avatar Jan 31 '23 10:01 derberg