Skip to content

Commit

Permalink
removed @id and @etag. @type is conditionally added. Also fixed issue…
Browse files Browse the repository at this point in the history
… with @count not being prefix in v3.0
  • Loading branch information
snebjorn committed May 19, 2020
1 parent 889743d commit cffcaa1
Show file tree
Hide file tree
Showing 32 changed files with 185 additions and 1,621 deletions.
182 changes: 23 additions & 159 deletions examples/TripPin.openapi3.json
Original file line number Diff line number Diff line change
Expand Up @@ -3256,19 +3256,6 @@
"title": "City",
"type": "object",
"properties": {
"@odata.etag": {
"example": "W/\"08D7D40891852C76\"",
"readOnly": true,
"type": "string"
},
"@odata.id": {
"readOnly": true,
"type": "string"
},
"@odata.type": {
"readOnly": true,
"type": "string"
},
"CountryRegion": {
"type": "string"
},
Expand Down Expand Up @@ -3314,19 +3301,6 @@
"title": "Location",
"type": "object",
"properties": {
"@odata.etag": {
"example": "W/\"08D7D40891852C76\"",
"readOnly": true,
"type": "string"
},
"@odata.id": {
"readOnly": true,
"type": "string"
},
"@odata.type": {
"readOnly": true,
"type": "string"
},
"Address": {
"type": "string"
},
Expand Down Expand Up @@ -3390,18 +3364,8 @@
"title": "EventLocation",
"type": "object",
"properties": {
"@odata.etag": {
"example": "W/\"08D7D40891852C76\"",
"readOnly": true,
"type": "string"
},
"@odata.id": {
"readOnly": true,
"type": "string"
},
"@odata.type": {
"readOnly": true,
"type": "string"
"$ref": "#/components/schemas/type"
},
"Address": {
"type": "string"
Expand All @@ -3419,6 +3383,9 @@
"title": "EventLocation (for create)",
"type": "object",
"properties": {
"@odata.type": {
"$ref": "#/components/schemas/type"
},
"Address": {
"type": "string"
},
Expand Down Expand Up @@ -3451,18 +3418,8 @@
"title": "AirportLocation",
"type": "object",
"properties": {
"@odata.etag": {
"example": "W/\"08D7D40891852C76\"",
"readOnly": true,
"type": "string"
},
"@odata.id": {
"readOnly": true,
"type": "string"
},
"@odata.type": {
"readOnly": true,
"type": "string"
"$ref": "#/components/schemas/type"
},
"Address": {
"type": "string"
Expand All @@ -3479,6 +3436,9 @@
"title": "AirportLocation (for create)",
"type": "object",
"properties": {
"@odata.type": {
"$ref": "#/components/schemas/type"
},
"Address": {
"type": "string"
},
Expand Down Expand Up @@ -3509,19 +3469,6 @@
"title": "Photo",
"type": "object",
"properties": {
"@odata.etag": {
"example": "W/\"08D7D40891852C76\"",
"readOnly": true,
"type": "string"
},
"@odata.id": {
"readOnly": true,
"type": "string"
},
"@odata.type": {
"readOnly": true,
"type": "string"
},
"Id": {
"anyOf": [
{
Expand Down Expand Up @@ -3564,19 +3511,6 @@
"title": "Person",
"type": "object",
"properties": {
"@odata.etag": {
"example": "W/\"08D7D40891852C76\"",
"readOnly": true,
"type": "string"
},
"@odata.id": {
"readOnly": true,
"type": "string"
},
"@odata.type": {
"readOnly": true,
"type": "string"
},
"UserName": {
"type": "string"
},
Expand Down Expand Up @@ -3734,19 +3668,6 @@
"title": "Airline",
"type": "object",
"properties": {
"@odata.etag": {
"example": "W/\"08D7D40891852C76\"",
"readOnly": true,
"type": "string"
},
"@odata.id": {
"readOnly": true,
"type": "string"
},
"@odata.type": {
"readOnly": true,
"type": "string"
},
"AirlineCode": {
"type": "string"
},
Expand Down Expand Up @@ -3777,19 +3698,6 @@
"title": "Airport",
"type": "object",
"properties": {
"@odata.etag": {
"example": "W/\"08D7D40891852C76\"",
"readOnly": true,
"type": "string"
},
"@odata.id": {
"readOnly": true,
"type": "string"
},
"@odata.type": {
"readOnly": true,
"type": "string"
},
"IcaoCode": {
"type": "string"
},
Expand Down Expand Up @@ -3835,19 +3743,6 @@
"title": "PlanItem",
"type": "object",
"properties": {
"@odata.etag": {
"example": "W/\"08D7D40891852C76\"",
"readOnly": true,
"type": "string"
},
"@odata.id": {
"readOnly": true,
"type": "string"
},
"@odata.type": {
"readOnly": true,
"type": "string"
},
"PlanItemId": {
"type": "integer",
"format": "int32"
Expand Down Expand Up @@ -3963,18 +3858,8 @@
"title": "PublicTransportation",
"type": "object",
"properties": {
"@odata.etag": {
"example": "W/\"08D7D40891852C76\"",
"readOnly": true,
"type": "string"
},
"@odata.id": {
"readOnly": true,
"type": "string"
},
"@odata.type": {
"readOnly": true,
"type": "string"
"$ref": "#/components/schemas/type"
},
"PlanItemId": {
"type": "integer",
Expand Down Expand Up @@ -4018,6 +3903,9 @@
"title": "PublicTransportation (for create)",
"type": "object",
"properties": {
"@odata.type": {
"$ref": "#/components/schemas/type"
},
"ConfirmationCode": {
"type": "string",
"nullable": true
Expand Down Expand Up @@ -4094,18 +3982,8 @@
"title": "Flight",
"type": "object",
"properties": {
"@odata.etag": {
"example": "W/\"08D7D40891852C76\"",
"readOnly": true,
"type": "string"
},
"@odata.id": {
"readOnly": true,
"type": "string"
},
"@odata.type": {
"readOnly": true,
"type": "string"
"$ref": "#/components/schemas/type"
},
"PlanItemId": {
"type": "integer",
Expand Down Expand Up @@ -4155,6 +4033,9 @@
"title": "Flight (for create)",
"type": "object",
"properties": {
"@odata.type": {
"$ref": "#/components/schemas/type"
},
"ConfirmationCode": {
"type": "string",
"nullable": true
Expand Down Expand Up @@ -4234,18 +4115,8 @@
"title": "Event",
"type": "object",
"properties": {
"@odata.etag": {
"example": "W/\"08D7D40891852C76\"",
"readOnly": true,
"type": "string"
},
"@odata.id": {
"readOnly": true,
"type": "string"
},
"@odata.type": {
"readOnly": true,
"type": "string"
"$ref": "#/components/schemas/type"
},
"PlanItemId": {
"type": "integer",
Expand Down Expand Up @@ -4286,6 +4157,9 @@
"title": "Event (for create)",
"type": "object",
"properties": {
"@odata.type": {
"$ref": "#/components/schemas/type"
},
"ConfirmationCode": {
"type": "string",
"nullable": true
Expand Down Expand Up @@ -4356,19 +4230,6 @@
"title": "Trip",
"type": "object",
"properties": {
"@odata.etag": {
"example": "W/\"08D7D40891852C76\"",
"readOnly": true,
"type": "string"
},
"@odata.id": {
"readOnly": true,
"type": "string"
},
"@odata.type": {
"readOnly": true,
"type": "string"
},
"TripId": {
"type": "integer",
"format": "int32"
Expand Down Expand Up @@ -4577,6 +4438,9 @@
"type": "number"
}
},
"type": {
"type": "string"
},
"error": {
"type": "object",
"required": [
Expand Down
29 changes: 3 additions & 26 deletions examples/annotations.openapi3.json
Original file line number Diff line number Diff line change
Expand Up @@ -2565,19 +2565,6 @@
"title": "SinglePartKey",
"type": "object",
"properties": {
"@etag": {
"example": "W/\"08D7D40891852C76\"",
"readOnly": true,
"type": "string"
},
"@id": {
"readOnly": true,
"type": "string"
},
"@type": {
"readOnly": true,
"type": "string"
},
"ID": {
"type": "string"
},
Expand Down Expand Up @@ -3031,19 +3018,6 @@
"title": "TwoPartKey",
"type": "object",
"properties": {
"@etag": {
"example": "W/\"08D7D40891852C76\"",
"readOnly": true,
"type": "string"
},
"@id": {
"readOnly": true,
"type": "string"
},
"@type": {
"readOnly": true,
"type": "string"
},
"One": {
"type": "integer",
"format": "int32"
Expand Down Expand Up @@ -3087,6 +3061,9 @@
],
"description": "The number of entities in the collection. Available when using the [$count](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptioncount) query option."
},
"type": {
"type": "string"
},
"error": {
"type": "object",
"required": [
Expand Down
16 changes: 3 additions & 13 deletions examples/authorization.openapi3.json
Original file line number Diff line number Diff line change
Expand Up @@ -277,19 +277,6 @@
"title": "Person",
"type": "object",
"properties": {
"@odata.etag": {
"example": "W/\"08D7D40891852C76\"",
"readOnly": true,
"type": "string"
},
"@odata.id": {
"readOnly": true,
"type": "string"
},
"@odata.type": {
"readOnly": true,
"type": "string"
},
"ID": {
"type": "string"
},
Expand Down Expand Up @@ -336,6 +323,9 @@
],
"description": "The number of entities in the collection. Available when using the [$count](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptioncount) query option."
},
"type": {
"type": "string"
},
"error": {
"type": "object",
"required": [
Expand Down
Loading

0 comments on commit cffcaa1

Please sign in to comment.