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
Copy file name to clipboardExpand all lines: source/devapi/hlapi/schemas.rst
+4-12Lines changed: 4 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ Let's look at a partial version of the schema definition for a User since it sho
48
48
'type' => Doc\Schema::TYPE_INTEGER,
49
49
'format' => Doc\Schema::FORMAT_INTEGER_INT64,
50
50
'description' => 'ID',
51
-
'x-readonly' => true,
51
+
'readOnly' => true,
52
52
],
53
53
'username' => [
54
54
'x-field' => 'name',
@@ -96,13 +96,13 @@ Let's look at a partial version of the schema definition for a User since it sho
96
96
'type' => Doc\Schema::TYPE_STRING,
97
97
'format' => Doc\Schema::FORMAT_STRING_PASSWORD,
98
98
'description' => 'Password',
99
-
'x-writeonly' => true,
99
+
'writeOnly' => true,
100
100
],
101
101
'password2' => [
102
102
'type' => Doc\Schema::TYPE_STRING,
103
103
'format' => Doc\Schema::FORMAT_STRING_PASSWORD,
104
104
'description' => 'Password confirmation',
105
-
'x-writeonly' => true,
105
+
'writeOnly' => true,
106
106
],
107
107
'picture' => [
108
108
'type' => Doc\Schema::TYPE_STRING,
@@ -146,7 +146,7 @@ The full schema can be specified using the 'x-full-schema' field.
146
146
The criteria for the join is specified in the 'x-join' field (more on that in the :ref:`Joins section <joins>`).
147
147
148
148
Users have two password fields which we would never want to show via the API, but we do want them to exist in the schema to allow setting/resetting a password.
149
-
In this case, both 'password' and 'password2' have a 'x-writeonly' field present and set to true.
149
+
In this case, both 'password' and 'password2' have a 'writeOnly' field present and set to true.
150
150
151
151
The last property shown, 'picture', is an example of a mapped property.
152
152
In some cases, the data we want the user to see will differ from the raw value in the database.
@@ -243,10 +243,6 @@ Below is a complete list of supported extension fields/properties used in OpenAP
243
243
- A callable that transforms the raw value specified by 'x-mapped-from' to the display value.
244
244
- Schema properties
245
245
- Debug mode only
246
-
* - x-readonly
247
-
- Specifies the property can only be read and not written to.
248
-
- Schema properties
249
-
- Yes
250
246
* - x-rights-conditions
251
247
- Array of arrays or callables that returns an array of SQL criteria for special visibility restrictions. Only 'read' restrictions are currently supported.
252
248
The type of restriction should be specified as the array key, and the callable or array as the value.
@@ -258,7 +254,3 @@ Below is a complete list of supported extension fields/properties used in OpenAP
258
254
Typically you would find all shared properties between the different schemas and use that as the properties for this shared schema.
259
255
- Main schema
260
256
- Debug mode only
261
-
* - x-writeonly
262
-
- Specifies the property can only be written to and not read.
0 commit comments