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

Rely on supported AllOf approach for creating nullable reference schemas #1240

Closed
wants to merge 31 commits into from

Conversation

maurei
Copy link
Member

@maurei maurei commented Jan 6, 2023

Uses the Swashbuckle built-in support for AllOf to create nullable reference schema types, rather than the approach I had before using oneOf, see domaindrivendev/Swashbuckle.AspNetCore#861.

Apart from yielding a cleaner implementation, it will also be needed to properly support complex attributes as per #1051.

Todo: set base branch to open-api once #1185 is merged.

maurei and others added 30 commits September 6, 2022 13:14
Merge openapi branch into PR 1185: Support NRT and MSV in required and nullable
OpenApiTests/SchemaProperties test collection:
* Allow for usage of OpenApiStartup directly
* Remove unneeded adding of JsonConverter
* Replace null checks with .ShouldHaveCount() calls
* Adjust test names
Misc:
* Reverted .editorconfig changes and fixed ApiException constructor instead
* Remove Debug statement
SchemaProperty Tests:
* More rigorous test suite, see PR description

IJsonApiClient:
* Renamed registration method to a more functionally descriptive name.
* Improved documentation to contain most relevant information on top instead of at the end, and removed ambiguigity in wording.

JsonApiClient
* Fix bug: disallow omitting members that are explicitly required by the OAS description
* Renamed AttributeNamesContainer to AttributesObjectContext because it was more than just a container
* Misc: better variable naming
… with existing test suite

- Use existing DbContext instead of temporary one
…a-property-tests

Improved JsonApiClient and relationships into `openapi-required-and-nullable`
…1111

Organise tests such that they map directly to the tables in #1231 and #1111
-> in sync with latest version of nullability/required table
-> introduces ResourceFieldValidationMetadataProvider
-> Fix test in legacy projects
-> Reusable faker building block for OpenApiClient related concerns
@maurei maurei changed the title Use rely on supported AllOf approach for creating nullable reference schemas Rely on supported AllOf approach for creating nullable reference schemas Jan 6, 2023
Base automatically changed from openapi-required-and-nullable-properties to openapi October 9, 2023 19:15
@bkoelman
Copy link
Member

Superseded by #1372.

@bkoelman bkoelman closed this Oct 27, 2023
@bkoelman bkoelman deleted the openapi-use-allof-for-null branch October 27, 2023 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants