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

Not able to define headers in request without schema #650

Closed
victorlev01 opened this issue Mar 13, 2024 · 2 comments
Closed

Not able to define headers in request without schema #650

victorlev01 opened this issue Mar 13, 2024 · 2 comments
Labels
bug Something isn't working staged for release

Comments

@victorlev01
Copy link
Contributor

victorlev01 commented Mar 13, 2024

Problem - no schema for headers (HeadersNotDocumented) defined in Kafka Listeners.
As we have many listeners like this, for user there is no way to test them.

Dependencies and versions used
implementation 'io.github.springwolf:springwolf-kafka:1.0.0'
implementation 'io.github.springwolf:springwolf-ui:1.0.0'

Code example
Workaround used around this issue:

`@Component
public class CustomAsyncApiCustomizer implements AsyncApiCustomizer {

@Override
public void customize(AsyncAPI asyncAPI) {
            var components = asyncAPI.getComponents();
            var notDocumentedHeaders = components.getSchemas().get("HeadersNotDocumented");
            notDocumentedHeaders.setType("object");
            var exampleHeader = new HashMap<String, String>();
            exampleHeader.put("key", "value");
            notDocumentedHeaders.setExamples(List.of(exampleHeader));`

Stack trace and error logs
No errors, just missing user experience

Created pr changing default ui behavior - hiding headers without schema or examples
#649

@victorlev01 victorlev01 added the bug Something isn't working label Mar 13, 2024
Copy link

Welcome to Springwolf. Thanks a lot for reporting your first issue. Please check out our contributors guide and feel free to join us on discord.

@timonback
Copy link
Member

Thank you @victorlev01 for the feature request and contribution.
It has just been released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working staged for release
Projects
None yet
Development

No branches or pull requests

2 participants