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: src/oas.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -318,13 +318,13 @@ This specification only requires that the data is valid according to the schema,
318
318
319
319
##### Non-JSON Data
320
320
321
-
Non-JSON serializetions can be substantially different from their corresponding data form, and might require several steps to parse.
321
+
Non-JSON serializations can be substantially different from their corresponding data form, and might require several steps to parse.
322
322
323
323
To continue our "when" example, if we serialized the object as `application/x-www-form-urlencoded`, it would appear as the ASCII string `when=1985-04-12T23%3A20%3A50.52`.
324
324
This example is still straightforward to use as it is all string data, and the only differences from JSON are the URI percent-encoding and the delimiter syntax (`=` instead of JSON punctuation and quoting).
325
325
326
326
However, many non-JSON text-based formats can be complex, requiring examination of the appropriate schema(s) in order to correctly parse the text into a schema-ready data structure.
327
-
Serializing data into such formats requires either examing the schema-validated data or performing the same schema inspections.
327
+
Serializing data into such formats requires either examining the schema-validated data or performing the same schema inspections.
328
328
329
329
When inspecting schemas, given a starting point schema, implementations MUST examine that schema and all schemas that can be reached from it by following only `$ref` and `allOf` keywords.
330
330
These schemas are guaranteed to apply to any instance.
@@ -376,7 +376,7 @@ We must first search the schema for `properties` or other property-defining keyw
376
376
* `#/components/schemas/FormData/properties/code/allOf/0` (follow `allOf`, but no `type`)
377
377
* `#/components/schemas/FormData/properties/code/allOf/1` (follow `allOf`, found `type: string`)
378
378
* `#/components/schemas/FormData/properties/count` (starting point schema for `count` property, found `type: integer`)
379
-
* `#/components/schemas/FormData/properties/extra` (starting point schema for `count` property, found `type: object`)
379
+
* `#/components/schemas/FormData/properties/extra` (starting point schema for `extra` property, found `type: object`)
380
380
381
381
From this, we determine that `code` is a string that happens to look like a number, while `count` needs to be parsed into a number _prior_ to schema validation.
382
382
Furthermore, the `extra` string is in fact an XML serialization of an object containing an `info` property.
0 commit comments