-
Notifications
You must be signed in to change notification settings - Fork 16
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 NodaTime Serialization #216
Merged
zysim
merged 7 commits into
leaderboardsgg:next
from
TheTedder:fix-nodatime-serialization
Jul 21, 2024
Merged
Fix NodaTime Serialization #216
zysim
merged 7 commits into
leaderboardsgg:next
from
TheTedder:fix-nodatime-serialization
Jul 21, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zysim
reviewed
Jul 20, 2024
TheTedder
added a commit
to TheTedder/leaderboard-backend
that referenced
this pull request
Aug 11, 2024
* Add NodaTime and related packages. * Configure NodaTime serialization. * Remove RequiredNotNullableSchemaFilter. * Update openapi.json. * Configure JsonSerializerOptions for tests. * Fix Instant example values. * Choose an example ZonedDateTime.
TheTedder
added a commit
that referenced
this pull request
Aug 11, 2024
* Add NodaTime and related packages. * Configure NodaTime serialization. * Remove RequiredNotNullableSchemaFilter. * Update openapi.json. * Configure JsonSerializerOptions for tests. * Fix Instant example values. * Choose an example ZonedDateTime.
TheTedder
added a commit
that referenced
this pull request
Aug 11, 2024
* Fix NodaTime Serialization (#216) * Add NodaTime and related packages. * Configure NodaTime serialization. * Remove RequiredNotNullableSchemaFilter. * Update openapi.json. * Configure JsonSerializerOptions for tests. * Fix Instant example values. * Choose an example ZonedDateTime. * Update Models (#217) * Configure NodaTime serialization. * Update openapi.json. * Add CreatedAd, DeletedAt to run models. * Add migrations for new Run properties. * Add Run Info. * Rename Leaderboard Rules to Info. * Update Leaderboard comments. * Fix RunViewModel formatting. * Require all timestamps for RunViewModel. * Add timestamp properties to Leaderboard. * Add LB timestamps to DB schema. * Rename Category Rules to Info. * Remove unnecessary LB request defaults. * Add Info to CreateLeaderboardRequest. * Remove unnecessary default value. * MAke CreateCategoryRequest.Info required. * Use `required` keyword instead of attribute. * Remove unnecessary JsonIgnore attribute. * Include Info in Category equality check. * Remove min and max player counts. * Add timestamps to Category. * Use Info when comparing Leaderboards. * Add Category Sort Direction. * Add EFCore.CheckConstraints package. * Enable constraints. * Remove Required attribute. * Add DB constraints to LeaderBoard slugs. * Fix bad Leaderboard slug regex. * Use realistic test data. * Add constraints to Category Slug. * Add RunType enum. * Add Category Type. * Update Leaderboard GetHashCode() * Update Category GetHashCode(). * Enable swagger inheriance and polymorphism. * Add Run TimeOrScore. * Use the default discriminator property name. * Allow instantiation of RunViewModel. * Load related Categories for Runs. * Add computed Type property. * Add explicit discriminator property to RunViewModel. * Add computer Time property to Run. * Use the default discriminator name. * Add uniqueness constraint to Leaderboard Slug. * Fix bad rebase. * Make a Run belong to a User. * Update openapi.json. * Remove unnecessary JsonConverter Attribute. * Add CreatedAt timestamp to User. * Update registration tests. * Add Type to CreateCategoryRequest. * Add validation to CreateCategoryRequest. * Create reusable slug validation. * Create a unique index on Category Slug. * Add CreateLeaderboardRequest Validation. * Update CreateRunRequest. * Remove unnecessary imports. * Add a setter for Run Time. * Disallow URL encoded characters in slugs.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes an issue where NodaTime types such as
Instant
andDuration
were being serialized as objects instead of string values. It also gets rid of the schema filter that marks all non-nullable types as required in the openapi spec. It's better to just use therequired
keyword so there's no ambiguity.