Repository navigation
Replies: 1 comment
|
@squiaios this really is a valid problem! Converting to the issue |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Description :
Context
Currently, when a property in a
FormRequesthas both a PHPDoc description and a customRuleTransformerthat sets a description, the PHPDoc description takes precedence and completely overwrites the one provided by theRuleTransformer.This happens in
SchemaBagToParametersTransformerwherePhpDocSchemaTransformeris called after the initial schema generation, replacing the description.The Problem
In many cases, a
RuleTransformerprovides technical details about a specific validation rule (e.g., "Must be a valid SIRET (14 digits)"), while the PHPDoc provides functional context (e.g., "The repairer's SIRET").We often want both informations in the final OpenAPI document, but currently, we have to choose one or implement complex
DocumentTransformersto manually merge them.Example
And the transformer:
Actual output: "Repairer's SIRET"
Desired output: "Repairer's SIRET. Must be a valid SIRET (14 digits)"
Proposed Solution
It would be great if Scramble could provide a way to "append" or "enrich" the description instead of just replacing it.
All reactions