More Descriptive Input/Output class names#2487
Conversation
- Updated the DocumentationNormalizer to give a more decriptive name for input/output classes - This looks very good when you name your DTO's like commands: `Book:CreateBookRequest` or `Book:UpdateBookForm` etc etc. Signed-off-by: RJ Garcia <rj@bighead.net>
dunglas
left a comment
There was a problem hiding this comment.
Indeed it looks better, but it isn't conflict free: if you have two DTO named Foo in different namespaces, it will conflict, it wasn't the case before.
|
Yes but they are still prefixed by the main resource short name. So you’d have to use two same names input in different namespaces for the same main resource to see this conflict |
|
In fact we should first do the missing part of input/output which is to have a list of all the classes (resources + i/o) supported. These will then be used to generate a hydra context. This will allow to detect conflicts before they actually are an issue. There's a bit more work to do on this before we can change the name in the documentation. |
Conflicts occur right now if you rely on DTOs. So this MR will not break already broken things. :D |
|
Anyway, keeping md5 is a weird option because upon |
|
Can you rebase this one @ragboyjr? I would like to merge it. A future enhancement would be to make the name configurable. |
|
and target 2.5 :p |
|
sounds good guys! Will do rebase off of 2.5 :) |
|
I've seen many changes between 2.5 and 2.4 - it seems the generation of the name has moved, so just rebasing won't be enough. Name generation is done here now: core/src/JsonSchema/SchemaFactory.php Line 209 in e468d98 |
|
superseeded by #3228 |
|
Is there a chance it will be possible to customize prefixes for different DTO's? |
a more decriptive name for input/output classes
like commands:
Book:CreateBookRequestorBook:UpdateBookFormetc etc.Signed-off-by: RJ Garcia rj@bighead.net