We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c8a8ae2 commit 7cbc97aCopy full SHA for 7cbc97a
1 file changed
docs/json-schema/schema-types/object.mdx
@@ -103,6 +103,29 @@ $productSchema = Schema::object('product')
103
```
104
</Accordion>
105
106
+## Property Titles
107
+
108
+Property names are defined by the schema constructor argument, while `title()` is metadata and only included when it differs from the property name:
109
110
+```php
111
+$schema = Schema::object()
112
+ ->properties(
113
+ Schema::string('email')->title('Email Address')
114
+ );
115
+```
116
117
+```json
118
+{
119
+ "type": "object",
120
+ "properties": {
121
+ "email": {
122
+ "type": "string",
123
+ "title": "Email Address"
124
+ }
125
126
+}
127
128
129
## Required Properties
130
131
Specify which properties are mandatory:
0 commit comments