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

Query parameter mapped via MapParams is not present in OpenAPI spec #3053

Closed
nya1 opened this issue Apr 18, 2022 · 2 comments · Fixed by #3381
Closed

Query parameter mapped via MapParams is not present in OpenAPI spec #3053

nya1 opened this issue Apr 18, 2022 · 2 comments · Fixed by #3381
Labels

Comments

@nya1
Copy link
Contributor

nya1 commented Apr 18, 2022

Using Goa version v3.7.2

Design example to reproduce

The expected metadata Attribute of MapOf(String, String) type is
mapped to the HTTP transport as MapParams("metadata")

The metadata query parameter can be passed to the URL as the following:
GET /multiply/?metadata[testKey]=val

The service will correctly receive map[testKey:val], but the OpenAPI generated
it's not listing the metadata in the endpoint.

Expected

metadata query parameter to be present in OpenAPI like the other mapped attributes, example:

      parameters:
      - in: query
        name: metadata
        description: this should be on openapi
        required: false
        schema:
          type: object
          additionalProperties: true
          example:
            testKey: val
        style: deepObject

You can find all files / setup to reproduce the issue: https://github.com/nya1/goa-mapparams-repro

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@raphael
Copy link
Member

raphael commented Oct 1, 2023

Thanks for the nice repro, this is fixed in #3381

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants