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

Don't share API models across versions #1465

Closed
wants to merge 1 commit into from

Conversation

gunndabad
Copy link
Collaborator

@gunndabad gunndabad commented Aug 15, 2024

Until now we've reused some model types from previous versions instead of duplicating them. The thinking behind this was to avoid duplication but it's becoming messy and difficult to get right for versions where we want to tweak the response just a little (e.g. the main 'get person' endpoint).

This PR moves removes the reuse and adds a test that checks versioned types cannot reference other versions.

I started a spike some time ago on a source generator that would generate these types itself for cases where types don't need to change across versions but that's not ready to go just yet.

@gunndabad gunndabad closed this Aug 16, 2024
@gunndabad gunndabad deleted the dont-share-api-versions branch August 19, 2024 06:53
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.

1 participant