Skip to content

feat: support map #197

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

Merged
merged 8 commits into from
May 26, 2025
Merged

feat: support map #197

merged 8 commits into from
May 26, 2025

Conversation

sashamelentyev
Copy link
Collaborator

No description provided.

Signed-off-by: Sasha Melentyev <[email protected]>
@sashamelentyev sashamelentyev requested a review from Copilot May 25, 2025 12:52
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces support for map fields in the schema generation process by updating the generator logic and adding new map field definitions, along with corresponding OpenAPI schema components.

  • Updated internal generator to handle map entries and validate map key kinds.
  • Introduced helper functions isUnsupportedMapKeyKind and mkMapSchema to construct appropriate schemas for map fields.
  • Updated OpenAPI definitions and proto files to include new map field types.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
internal/gen/schema.go Enhances schema generation by skipping map entry messages and validating map key kinds via helpers.
example/openapi.yaml Adds new OpenAPI schema components for maps with string, int32, int64, uint32, and uint64 keys.
example/message.proto Introduces new map field definitions for various key types.

@sashamelentyev sashamelentyev requested a review from tdakkota May 25, 2025 12:59
Signed-off-by: Sasha Melentyev <[email protected]>
Signed-off-by: Sasha Melentyev <[email protected]>
Signed-off-by: Sasha Melentyev <[email protected]>
Signed-off-by: Sasha Melentyev <[email protected]>
Signed-off-by: Sasha Melentyev <[email protected]>
Signed-off-by: Sasha Melentyev <[email protected]>
Signed-off-by: Sasha Melentyev <[email protected]>
@sashamelentyev sashamelentyev merged commit adb395b into main May 26, 2025
10 checks passed
@tdakkota tdakkota deleted the support-map branch May 26, 2025 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants