-
Notifications
You must be signed in to change notification settings - Fork 241
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1899 from microsoft/mk/remove-recursive-keywords
OpenApiSchema refactor to remove recursive keywords
- Loading branch information
Showing
8 changed files
with
131 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
...ft.OpenApi.Readers.Tests/V31Tests/Samples/OpenApiSchema/schemaWithJsonSchemaKeywords.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
$schema: "https://json-schema.org/draft/2020-12/schema" | ||
$id: "https://example.com/schemas/person.schema.yaml" | ||
$comment: "A schema defining a person object with optional references to dynamic components." | ||
$vocabulary: | ||
"https://json-schema.org/draft/2020-12/vocab/core": true | ||
"https://json-schema.org/draft/2020-12/vocab/applicator": true | ||
"https://json-schema.org/draft/2020-12/vocab/validation": true | ||
"https://json-schema.org/draft/2020-12/vocab/meta-data": false | ||
"https://json-schema.org/draft/2020-12/vocab/format-annotation": false | ||
|
||
title: "Person" | ||
description: "Schema for a person object" | ||
type: "object" | ||
|
||
properties: | ||
name: | ||
type: "string" | ||
$comment: "The person's full name" | ||
age: | ||
type: "integer" | ||
minimum: 0 | ||
$comment: "Age must be a non-negative integer" | ||
address: | ||
$dynamicRef: "#addressDef" | ||
$comment: "Reference to an address definition which can change dynamically" | ||
|
||
required: | ||
- name | ||
|
||
$dynamicAnchor: "addressDef" | ||
definitions: | ||
address: | ||
$dynamicAnchor: "addressDef" | ||
type: "object" | ||
properties: | ||
street: | ||
type: "string" | ||
city: | ||
type: "string" | ||
postalCode: | ||
type: "string" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters