Skip to content

Commit 9fb9893

Browse files
handrewsralfhandl
andauthored
Apply suggestions from code review
Co-authored-by: Ralf Handl <[email protected]>
1 parent 62d67f3 commit 9fb9893

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/oas.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,13 +318,13 @@ This specification only requires that the data is valid according to the schema,
318318

319319
##### Non-JSON Data
320320

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.
322322

323323
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`.
324324
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).
325325

326326
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.
328328

329329
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.
330330
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
376376
* `#/components/schemas/FormData/properties/code/allOf/0` (follow `allOf`, but no `type`)
377377
* `#/components/schemas/FormData/properties/code/allOf/1` (follow `allOf`, found `type: string`)
378378
* `#/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`)
380380

381381
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.
382382
Furthermore, the `extra` string is in fact an XML serialization of an object containing an `info` property.

0 commit comments

Comments
 (0)