Skip to content

Allow empty values for Kafka header documentation? #1871

Description

@ccudennec-otto

Describe the feature request
I have a header field that will always contain an empty value on purpose.
I used this snippet for documentation:

AsyncOperation.Headers.Header(
  name = "ce_tid",
  value = [""],
  description = "Tenant ID",
),

The generated documentation looks like this:

        ce_tid:
          title: ce_tid
          type: string
          description: Tenant ID

It would be nice to see the value either as const (https://json-schema.org/understanding-json-schema/reference/const) or enum with one value (https://json-schema.org/understanding-json-schema/reference/enum)

If I understand it correctly, empty values are filtered out here: https://github.com/springwolf/springwolf-core/blob/main/springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/scanners/common/annotation/AsyncAnnotationUtil.java#L97-L104

Motivation

An empty value is a value that meets the requirements of the contract that I need to implement.
It would be helpful to see the proper documentation.

Technical details

I see that the documentation already converts the value array to enum.
Personally, I'd prefer a const if there is only one value.
In any case IMHO the value should be documented.

Describe alternatives you've considered

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions