Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add xms-ids for mediaservices #17742

Merged
merged 2 commits into from
Mar 7, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@
"items": {
"$ref": "#/definitions/FilterTrackPropertyCondition"
},
"x-ms-identifiers": [],
"description": "The track selections."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is one more array in this file, AccountFilterCollection->value. does this not need x-ms-identifiers?

}
},
Expand All @@ -186,6 +187,7 @@
"items": {
"$ref": "#/definitions/FilterTrackSelection"
},
"x-ms-identifiers": [],
"description": "The tracks selection conditions."
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@
"items": {
"$ref": "#/definitions/MetricDimension"
},
"x-ms-identifiers": [
"name"
],
"description": "The metric dimensions.",
"readOnly": true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here MediaServiceProperties - > storageAccounts is also an array. does this not need x-ms-idenitfiers. Can you explain a little on which scenario should we be adding this new property?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type object of storageAccounts, which is sotrageAccount in this case, has a property named "id" already, which is the default value expected when x-ms-identifiers is not specified.

Same reason for AccountFilterCollection.

Hope this helps :)

},
Expand Down Expand Up @@ -236,6 +239,9 @@
"items": {
"$ref": "#/definitions/LogSpecification"
},
"x-ms-identifiers": [
"name"
],
"description": "List of log specifications.",
"readOnly": true
},
Expand All @@ -244,6 +250,9 @@
"items": {
"$ref": "#/definitions/MetricSpecification"
},
"x-ms-identifiers": [
"name"
],
"description": "List of metric specifications.",
"readOnly": true
}
Expand Down Expand Up @@ -754,6 +763,9 @@
"items": {
"$ref": "#/definitions/Operation"
},
"x-ms-identifiers": [
"name"
],
"description": "A collection of Operation items."
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@
"items": {
"$ref": "#/definitions/AssetFileEncryptionMetadata"
},
"x-ms-identifiers": [
"assetFileId"
],
"description": "Asset File encryption metadata."
}
},
Expand All @@ -154,6 +157,9 @@
"items": {
"$ref": "#/definitions/AssetStreamingLocator"
},
"x-ms-identifiers": [
"name"
],
"description": "The list of Streaming Locators.",
"readOnly": true
}
Expand Down Expand Up @@ -371,6 +377,7 @@
"items": {
"$ref": "#/definitions/FilterTrackPropertyCondition"
},
"x-ms-identifiers": [],
"description": "The track selections."
}
},
Expand All @@ -395,6 +402,7 @@
"items": {
"$ref": "#/definitions/FilterTrackSelection"
},
"x-ms-identifiers": [],
"description": "The tracks selection conditions."
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -473,13 +473,15 @@
"items": {
"$ref": "#/definitions/ContentKeyPolicyRestrictionTokenKey"
},
"x-ms-identifiers": [],
"description": "A list of alternative verification keys."
},
"requiredClaims": {
"type": "array",
"items": {
"$ref": "#/definitions/ContentKeyPolicyTokenClaim"
},
"x-ms-identifiers": [],
"description": "A list of required token claims."
},
"restrictionTokenType": {
Expand Down Expand Up @@ -577,6 +579,7 @@
"items": {
"$ref": "#/definitions/ContentKeyPolicyPlayReadyLicense"
},
"x-ms-identifiers": [],
"description": "The PlayReady licenses."
},
"responseCustomData": {
Expand Down Expand Up @@ -751,6 +754,9 @@
"items": {
"$ref": "#/definitions/ContentKeyPolicyOption"
},
"x-ms-identifiers": [
"policyOptionId"
],
"description": "The Key Policy options."
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,9 @@
"items": {
"$ref": "#/definitions/H265Layer"
},
"x-ms-identifiers": [
"label"
],
"description": "The collection of output H.265 layers to be produced by the encoder."
}
},
Expand Down Expand Up @@ -552,6 +555,7 @@
"items": {
"$ref": "#/definitions/TrackDescriptor"
},
"x-ms-identifiers": [],
"description": "The list of TrackDescriptors which define the metadata and selection of tracks in the input."
}
},
Expand Down Expand Up @@ -1037,6 +1041,9 @@
"items": {
"$ref": "#/definitions/Overlay"
},
"x-ms-identifiers": [
"inputLabel"
],
"description": "The properties of overlays to be applied to the input video. These could be audio, image or video overlays."
}
},
Expand Down Expand Up @@ -1220,6 +1227,9 @@
"items": {
"$ref": "#/definitions/H264Layer"
},
"x-ms-identifiers": [
"label"
],
"description": "The collection of output H.264 layers to be produced by the encoder."
}
},
Expand All @@ -1239,6 +1249,9 @@
"items": {
"$ref": "#/definitions/JpgLayer"
},
"x-ms-identifiers": [
"label"
],
"description": "A collection of output JPEG image layers to be produced by the encoder."
},
"spriteColumn": {
Expand Down Expand Up @@ -1280,6 +1293,7 @@
"items": {
"$ref": "#/definitions/OutputFile"
},
"x-ms-identifiers": [],
"description": "The list of output files to produce. Each entry in the list is a set of audio and video layer labels to be muxed together ."
}
},
Expand Down Expand Up @@ -1326,6 +1340,9 @@
"items": {
"$ref": "#/definitions/PngLayer"
},
"x-ms-identifiers": [
"label"
],
"description": "A collection of output PNG image layers to be produced by the encoder."
}
},
Expand Down Expand Up @@ -1471,13 +1488,17 @@
"items": {
"$ref": "#/definitions/Codec"
},
"x-ms-identifiers": [
"label"
],
"description": "The list of codecs to be used when encoding the input video."
},
"formats": {
"type": "array",
"items": {
"$ref": "#/definitions/Format"
},
"x-ms-identifiers": [],
"description": "The list of outputs to be produced by the encoder."
}
},
Expand Down Expand Up @@ -1755,6 +1776,7 @@
"items": {
"$ref": "#/definitions/TransformOutput"
},
"x-ms-identifiers": [],
"description": "An array of one or more TransformOutputs that the Transform should generate."
}
},
Expand Down Expand Up @@ -1831,6 +1853,7 @@
"items": {
"$ref": "#/definitions/InputDefinition"
},
"x-ms-identifiers": [],
"description": "Defines a list of InputDefinitions. For each InputDefinition, it defines a list of track selections and related metadata."
}
},
Expand Down Expand Up @@ -1904,6 +1927,7 @@
"items": {
"$ref": "#/definitions/JobInput"
},
"x-ms-identifiers": [],
"description": "List of inputs to a Job."
}
},
Expand Down Expand Up @@ -2176,6 +2200,9 @@
"items": {
"$ref": "#/definitions/JobErrorDetail"
},
"x-ms-identifiers": [
"code"
],
"description": "An array of details about specific errors that led to this reported error.",
"readOnly": true
}
Expand Down Expand Up @@ -2296,6 +2323,9 @@
"items": {
"$ref": "#/definitions/JobOutput"
},
"x-ms-identifiers": [
"label"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

label in the definition and a few other places, is not a required property. does it make sense to keep the array empty here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah totally. If there is no property can be used as an identifier, we can keep the x-ms-identifiers array empty.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have pushed a new commit for removing the not required label property from xms-ids. Please take a look.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change needed urgently? all our swaggers are auto generated from code. If we make this change now directly to swagger, in the next release, I have to manually manage these. I rather they be added in our service code, so they are added properly.

Another question, is changing these identifiers considered breaking change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The check for x-ms-identifiers will be turned on after the whole initial work is done. I am sorry that this may add more work to you. @yantang-msft this could be a generic problem for teams that auto-generate their swaggers. What would be your suggestions on this?

AFAIK, changing these identifiers in the future should not be a breaking change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @giakas, I checked with my team and unfortunately you team would probably have to manually add these annotations to the autogenerated swagger next time you generate them, or update the code generation tool to include this new annotation, which are what some other teams that have autogenerated swagger will be doing. I think for now we can check in this change first if you don't have any more code change request, which eliminates any unexpected error around x-ms-identifiers of your swaggers, and if you have any concerns or suggestions about how to make the work
better, please do feel free to reach out to me at ltong at microsoft.com or my team changeanalysisteam at microsoft.com, we would be more than happier to listen and chat about it over there.

],
"description": "The outputs for the Job."
},
"priority": {
Expand Down Expand Up @@ -2367,6 +2397,9 @@
"items": {
"$ref": "#/definitions/JobInputClip"
},
"x-ms-identifiers": [
"label"
],
"description": "JobInputs that make up the timeline."
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
"items": {
"$ref": "#/definitions/TrackPropertyCondition"
},
"x-ms-identifiers": [],
"description": "TrackSelections is a track property condition list which can specify track(s)"
}
},
Expand Down Expand Up @@ -127,6 +128,7 @@
"items": {
"$ref": "#/definitions/TrackSelection"
},
"x-ms-identifiers": [],
"description": "Tracks which use this content key"
}
},
Expand All @@ -144,6 +146,9 @@
"items": {
"$ref": "#/definitions/StreamingPolicyContentKey"
},
"x-ms-identifiers": [
"label"
],
"description": "Representing tracks needs separate content key"
}
},
Expand Down Expand Up @@ -272,6 +277,7 @@
"items": {
"$ref": "#/definitions/TrackSelection"
},
"x-ms-identifiers": [],
"description": "Representing which tracks should not be encrypted"
},
"contentKeys": {
Expand All @@ -297,6 +303,7 @@
"items": {
"$ref": "#/definitions/TrackSelection"
},
"x-ms-identifiers": [],
"description": "Representing which tracks should not be encrypted"
},
"contentKeys": {
Expand All @@ -322,6 +329,7 @@
"items": {
"$ref": "#/definitions/TrackSelection"
},
"x-ms-identifiers": [],
"description": "Representing which tracks should not be encrypted"
},
"contentKeys": {
Expand Down Expand Up @@ -443,6 +451,7 @@
"items": {
"$ref": "#/definitions/TrackSelection"
},
"x-ms-identifiers": [],
"description": "Tracks which use this Content Key",
"readOnly": true
}
Expand Down Expand Up @@ -616,6 +625,7 @@
"items": {
"$ref": "#/definitions/StreamingPath"
},
"x-ms-identifiers": [],
"description": "Streaming Paths supported by current Streaming Locator"
},
"downloadPaths": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1321,6 +1321,9 @@
"items": {
"$ref": "#/definitions/LiveEventEndpoint"
},
"x-ms-identifiers": [
"url"
],
"description": "The input endpoints for the live event."
}
},
Expand Down Expand Up @@ -1353,6 +1356,9 @@
"items": {
"$ref": "#/definitions/IPRange"
},
"x-ms-identifiers": [
"name"
],
"description": "The IP allow list."
}
},
Expand All @@ -1377,6 +1383,9 @@
"items": {
"$ref": "#/definitions/LiveEventEndpoint"
},
"x-ms-identifiers": [
"url"
],
"description": "The endpoints for preview. Do not share the preview URL with the live event audience."
},
"accessControl": {
Expand Down Expand Up @@ -1521,7 +1530,8 @@
"description": "Provides a mechanism to select the audio track in the input live feed, to which speech-to-text transcription is applied. This property is reserved for future use, any value set on this property will be ignored.",
"items": {
"$ref": "#/definitions/LiveEventInputTrackSelection"
}
},
"x-ms-identifiers": []
},
"outputTranscriptionTrack": {
"type": "object",
Expand Down Expand Up @@ -1585,6 +1595,9 @@
"items": {
"$ref": "#/definitions/LiveEventTranscription"
},
"x-ms-identifiers": [
"language"
],
"description": "Live transcription settings for the live event. See https://go.microsoft.com/fwlink/?linkid=2133742 for more information about the live transcription feature."
},
"provisioningState": {
Expand Down Expand Up @@ -1764,6 +1777,9 @@
"items": {
"$ref": "#/definitions/AkamaiSignatureHeaderAuthenticationKey"
},
"x-ms-identifiers": [
"identifier"
],
"description": "authentication key list"
}
},
Expand Down