Restore struct? default to false to suppress x-struct population#5
Closed
luisgabrielroldan wants to merge 1 commit into
Closed
Restore struct? default to false to suppress x-struct population#5luisgabrielroldan wants to merge 1 commit into
luisgabrielroldan wants to merge 1 commit into
Conversation
The upstream sync (#4, through v3.22.3) reverted the ActiveProspect fork patch that defaulted :struct? to false in build_schema/2, causing the x-struct vendor extension to be auto-populated with module names in generated specs. This restores the prior behavior.
Member
Author
|
Closing in favor of applying struct?: false per-schema in trustedform-api, to keep this fork aligned with upstream rather than re-introducing the divergence the upstream sync removed. |
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.
What
Restore the ActiveProspect fork patch that defaults
:struct?tofalseinbuild_schema/2(lib/open_api_spex.ex).Why
The upstream sync (#4, through v3.22.3) reverted this fork-specific default back to upstream's
true. As a result, thex-structvendor extension is now auto-populated with fully-qualified Elixir module names (e.g.Elixir.ClaimerWeb.Schemas.BadRequest) in generated OpenAPI specs, where the fork previously left itnull.This was surfaced while migrating trustedform-api's dependency reference from
tf-changes-rebasedtomaster(prep for Elixir 1.19 / OTP 28): regeneratingmake api-docsshowed every schema'sx-structflip fromnullto a module name.Effect
x-structreturns tonullin generated specs (no internal module names leaked into published docs).defstruct/@type tis generated for schema modules (gated onx-struct == __MODULE__). Verified trustedform-api does not construct or pattern-match these schema structs, so this is safe.Diff