Skip to content

Bugfix: fix metadata mapper type#887

Closed
CarlosGamero wants to merge 4 commits intomainfrom
bugfix/fix-metadata-mapper-type
Closed

Bugfix: fix metadata mapper type#887
CarlosGamero wants to merge 4 commits intomainfrom
bugfix/fix-metadata-mapper-type

Conversation

@CarlosGamero
Copy link
Copy Markdown
Collaborator

@CarlosGamero CarlosGamero commented Mar 9, 2026

Changes

Checklist

  • Apply one of following labels; major, minor, patch or skip-release
  • I've updated the documentation, or no changes were necessary
  • I've updated the tests, or no changes were necessary

AI Assistance Tracking

We're running a metric to understand where AI assists our engineering work. Please select exactly one of the options below:

Mark "Yes" if AI helped in any part of this work, for example: generating code, refactoring, debugging support,
explaining something, reviewing an idea, or suggesting an approach.

  • Yes, AI assisted with this PR
  • No, AI did not assist with this PR

@CarlosGamero CarlosGamero self-assigned this Mar 9, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 9, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: lokalise/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: cae2e4ac-d374-45a3-b483-832526c7e1ed

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bugfix/fix-metadata-mapper-type

Comment @coderabbitai help to get the list of available commands and usage tips.

# Conflicts:
#	packages/app/api-contracts/src/sse/dualModeContracts.ts
#	packages/app/api-contracts/src/sse/sseContractBuilders.ts
#	packages/app/api-contracts/src/sse/sseContracts.ts
* Provides a common base for metadata and OpenAPI documentation fields
* that are independent of schema types.
*/
export type BaseContractDefinition = {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Reducing duplication but adding a base type

metadata: ApiContract['metadata'],
) => Pick<
RouteType,
RouteOptions,
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

By using the generic Fastify RouteOptions, the type remains compatible with Opinionated Machine and likely with other libraries as well. If we use the custom RouteType, it introduces type issues.

For this case, both types are equivalent.

@CarlosGamero CarlosGamero deleted the bugfix/fix-metadata-mapper-type branch March 9, 2026 16:58
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 this pull request may close these issues.

1 participant