You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How can you indicate in the diagram that the field is required?
You can indicate that the field must have at least 1 chars. Does not work if field is not sent at all.
code
#[Key('ZIPcode')]
#[Description('ZIPcode')]
#[MinLength(1)]
#[MaxLength(15)]
protected ?string $zIPcode = null;
$schemaManager = new \PSX\Schema\SchemaManager();
// we read the schema from the class
$schema = $schemaManager->getSchema(\App\Model\XYZ::class);
$X = (new \PSX\Schema\SchemaTraverser())->traverse($body, $schema, new \PSX\Schema\Visitor\TypeVisitor());
Hi @teunlielu currently this is not possible, in general the idea is to only describe the properties and then you can check in your app the required fields, this is also useful if you need specific error messages.
How can you indicate in the diagram that the field is required?
You can indicate that the field must have at least 1 chars. Does not work if field is not sent at all.
code
Code is generate over:
https://typeapi.org/generator not over site.
The text was updated successfully, but these errors were encountered: