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

Fix open api specs for MULTI_SELECT #8494

Merged
merged 1 commit into from
Nov 14, 2024
Merged

Conversation

martmull
Copy link
Contributor

@martmull martmull commented Nov 14, 2024

Before

image

After

image

@martmull martmull linked an issue Nov 14, 2024 that may be closed by this pull request
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Fixed OpenAPI specification for MULTI_SELECT fields by correctly documenting them as arrays of enumerated values instead of single string values.

  • Modified getSchemaComponentsProperties in /packages/twenty-server/src/engine/core-modules/open-api/utils/components.utils.ts to handle MULTI_SELECT fields as arrays with enum values
  • Separated MULTI_SELECT handling from SELECT fields to ensure proper schema documentation
  • Added explicit array type definition with enumerated items for MULTI_SELECT fields

1 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

@martmull martmull force-pushed the fix-open-api-for-multi-select branch from 27a9ec6 to 8f0e97c Compare November 14, 2024 10:33
@martmull martmull enabled auto-merge (squash) November 14, 2024 10:37
@martmull martmull force-pushed the fix-open-api-for-multi-select branch from 8f0e97c to dcec118 Compare November 14, 2024 10:45
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.

Incorrect Type for Multiselect Fields in OpenAPI Specification
2 participants