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

Allow info-extensions in application.yml/props #395

Closed
tvahrst opened this issue Oct 13, 2023 · 1 comment
Closed

Allow info-extensions in application.yml/props #395

tvahrst opened this issue Oct 13, 2023 · 1 comment
Labels
enhancement New feature or request staged for release

Comments

@tvahrst
Copy link
Contributor

tvahrst commented Oct 13, 2023

Springwolf supports the definition of 'static' basic informations of an asyncapi spec (info, id, servers) by

  • providing an Docket Bean or
  • providing the necessary informations as environment properties (for example in application.yml) with the prefix springwolf.docket.*.

The second approach (docket data via environment) does currently not support the definition of extensions for the info-block. So it isn't possible to provide docket data so that the resulting asyncapi looks like this (info include x-additional-field):

{
  "asyncapi": "2.6.0",
  "info": {
    "title": "my-kafka-worker",
    "version": "1.0.0",
    "x-additional-field": "trulallal"
  },
  ...
}

For contact and license in turn there is a possibility to define extensions in the environmet, like this:

springwolf.docket.info.contact.extension-fields.x-userid = t.vahrst

I suggest to support the same extension pattern which allows extensions for 'contact' and 'license' to be appliable for 'info'.

@tvahrst tvahrst added the enhancement New feature or request label Oct 13, 2023
sam0r040 pushed a commit to sam0r040/springwolf-core that referenced this issue Oct 27, 2023
sam0r040 pushed a commit to sam0r040/springwolf-core that referenced this issue Oct 27, 2023
sam0r040 pushed a commit to sam0r040/springwolf-core that referenced this issue Oct 27, 2023
sam0r040 pushed a commit to sam0r040/springwolf-core that referenced this issue Oct 27, 2023
sam0r040 added a commit that referenced this issue Oct 27, 2023
* #395 support info-extensions definition in environment

* #395 changed extensionfields in ConfigDocket.Info to Map<String,String>

* #395 Integration tests for info/contact/license extensions in amqp-examples

* #395 reverted rename of asycnapi.json in amqp-examples

---------

Co-authored-by: Thomas Vahrst <[email protected]>
@timonback
Copy link
Member

Thank you for the report, the issue has been addressed in the new release.

An update on the documentation is welcome: springwolf/springwolf.github.io#58

Feel free to reopen this issue if there is still something missing.

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

No branches or pull requests

3 participants