OpenAPI Source Generation MVC Customization#48
Merged
Conversation
Signed-off-by: Kenny Pflug <kenny.pflug@live.de>
… MVC endpoint-local customization Signed-off-by: Kenny Pflug <kenny.pflug@live.de>
9 tasks
Minimum allowed line rate is |
There was a problem hiding this comment.
Pull request overview
Adds an additive, attribute-friendly MVC customization path for generated validation OpenAPI metadata by introducing a second, two-contract MVC attribute that mirrors Minimal API ordering (generated validator contract first, endpoint-local customization second).
Changes:
- Added
ProducesPortableValidationProblemForAttribute<TValidator, TEndpointContract>for MVC to apply generated metadata and then append endpoint-local builder customizations. - Added unit + integration tests to verify metadata arrays append (rather than replace) and to assert MVC behavior matches an equivalent Minimal API
configurecallback. - Updated README and added an implementation plan doc for issue #47.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Light.PortableResults.Validation.OpenApi.Tests/ValidationOpenApiAttributeTests.cs | Adds a unit test proving endpoint-local contract metadata is appended after the generated contract. |
| tests/Light.PortableResults.Validation.OpenApi.Tests/GeneratedValidationOpenApiIntegrationTests.cs | Adds an integration test comparing MVC two-contract attribute output to an equivalent Minimal API customization. |
| src/Light.PortableResults.Validation.OpenApi/ProducesPortableValidationProblemForAttribute.cs | Introduces the new two-contract MVC attribute and applies contracts in the intended order using a shared builder. |
| README.md | Documents the new MVC customization pattern alongside the existing Minimal API callback customization. |
| ai-plans/0047-openapi-source-generation-mvc-customization.md | Adds the plan/acceptance-criteria document corresponding to issue #47. |
This file contains hidden or 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
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.
Closes #47
Implemented as stated in the corresponding issue.