Skip to content

Commit

Permalink
suppress _type error, fix 'OBJECT_ADDITIONAL_PROPERTIES' error, add … (
Browse files Browse the repository at this point in the history
…#2)

Suppress _type error, fix 'OBJECT_ADDITIONAL_PROPERTIES'  error, add required parameters
  • Loading branch information
xiaojinghe authored Dec 8, 2017
1 parent 84d9582 commit bdcd117
Show file tree
Hide file tree
Showing 5 changed files with 165 additions and 1,111 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ These settings apply only when `--tag=release_1_0` is specified on the command l
input-file: v1.0/NewsSearch.json
```

## Suppressions

Suppressing errors due to API design:
``` yaml
directive:
- suppress: R3016
reason: _type is a polymorphic discriminator that can't be changed.
```

## CSharp Settings
These settings apply only when `--csharp` is specified on the command line.
``` yaml $(csharp)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@
}
},
"SearchResultsAnswer": {
"description": "Defines a search result answer.",
"allOf": [
{
"$ref": "#/definitions/Answer"
Expand Down Expand Up @@ -714,6 +715,7 @@
}
},
"Answer": {
"description": "Defines an answer.",
"allOf": [
{
"$ref": "#/definitions/Response"
Expand Down Expand Up @@ -747,6 +749,7 @@
}
},
"Thing": {
"description": "Defines a thing.",
"allOf": [
{
"$ref": "#/definitions/Response"
Expand All @@ -765,6 +768,7 @@
"type": "string"
},
"image": {
"description": "An image of the item.",
"$ref": "#/definitions/ImageObject",
"readOnly": true
},
Expand All @@ -789,6 +793,7 @@
"type": "string"
},
"alternateName": {
"description": "An alias for the item",
"readOnly": true,
"type": "string"
},
Expand Down Expand Up @@ -829,10 +834,12 @@
"type": "string"
},
"searchLink": {
"description": "The URL that you use to get the results of the related search. Before using the URL, you must append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header. Use this URL if you're displaying the results in your own user interface. Otherwise, use the webSearchUrl URL.",
"readOnly": true,
"type": "string"
},
"thumbnail": {
"description": "The URL to a thumbnail of a related image.",
"$ref": "#/definitions/ImageObject",
"readOnly": true
}
Expand Down Expand Up @@ -874,75 +881,8 @@
}
}
},
"ImageObject": {
"description": "Defines an image",
"allOf": [
{
"$ref": "#/definitions/MediaObject"
}
],
"type": "object",
"properties": {
"thumbnail": {
"description": "The URL to a thumbnail of the image",
"$ref": "#/definitions/ImageObject",
"readOnly": true
}
}
},
"VideoObject": {
"description": "Defines a video object that is relevant to the query.",
"allOf": [
{
"$ref": "#/definitions/MediaObject"
}
],
"type": "object",
"properties": {
"motionThumbnailUrl": {
"readOnly": true,
"type": "string"
},
"motionThumbnailId": {
"readOnly": true,
"type": "string"
},
"embedHtml": {
"readOnly": true,
"type": "string"
},
"allowHttpsEmbed": {
"readOnly": true,
"type": "boolean"
},
"viewCount": {
"readOnly": true,
"type": "integer",
"format": "int32"
},
"thumbnail": {
"$ref": "#/definitions/ImageObject",
"readOnly": true
},
"videoId": {
"readOnly": true,
"type": "string"
},
"allowMobileEmbed": {
"readOnly": true,
"type": "boolean"
},
"isSuperfresh": {
"readOnly": true,
"type": "boolean"
},
"isFromVerifiedSource": {
"readOnly": true,
"type": "boolean"
}
}
},
"CreativeWork": {
"description": "The most generic kind of creative work, including books, movies, photographs, software programs, etc.",
"allOf": [
{
"$ref": "#/definitions/Thing"
Expand All @@ -964,6 +904,7 @@
}
},
"datePublished": {
"description": "The date on which the CreativeWork was published.",
"readOnly": true,
"type": "string"
},
Expand All @@ -973,6 +914,32 @@
}
}
},
"Organization": {
"description": "Defines an organization.",
"allOf": [
{
"$ref": "#/definitions/Thing"
}
],
"type": "object",
"properties": {}
},
"ImageObject": {
"description": "Defines an image",
"allOf": [
{
"$ref": "#/definitions/MediaObject"
}
],
"type": "object",
"properties": {
"thumbnail": {
"description": "The URL to a thumbnail of the image",
"$ref": "#/definitions/ImageObject",
"readOnly": true
}
}
},
"Identifiable": {
"description": "Defines the identity of a resource.",
"allOf": [
Expand Down Expand Up @@ -1011,6 +978,7 @@
}
},
"MediaObject": {
"description": "Defines a media object.",
"allOf": [
{
"$ref": "#/definitions/CreativeWork"
Expand All @@ -1037,7 +1005,60 @@
}
}
},
"VideoObject": {
"description": "Defines a video object that is relevant to the query.",
"allOf": [
{
"$ref": "#/definitions/MediaObject"
}
],
"type": "object",
"properties": {
"motionThumbnailUrl": {
"readOnly": true,
"type": "string"
},
"motionThumbnailId": {
"readOnly": true,
"type": "string"
},
"embedHtml": {
"readOnly": true,
"type": "string"
},
"allowHttpsEmbed": {
"readOnly": true,
"type": "boolean"
},
"viewCount": {
"readOnly": true,
"type": "integer",
"format": "int32"
},
"thumbnail": {
"$ref": "#/definitions/ImageObject",
"readOnly": true
},
"videoId": {
"readOnly": true,
"type": "string"
},
"allowMobileEmbed": {
"readOnly": true,
"type": "boolean"
},
"isSuperfresh": {
"readOnly": true,
"type": "boolean"
},
"isFromVerifiedSource": {
"readOnly": true,
"type": "boolean"
}
}
},
"ResponseBase": {
"description": "Response base",
"discriminator": "_type",
"type": "object",
"required": [
Expand Down
Loading

0 comments on commit bdcd117

Please sign in to comment.