You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure where the right place to put this issue - The endpoint /Reports({Id})/SharedDataSets does not work with the go client generated from the swagger file. The response models in the swagger file do not match the response from the rest endpoint.
Version Info:
"version": "2.0",
"title": "SQL Server 2017 Reporting Services REST API"
In the swagger I had to change the endpoint definition:
for - "/Reports({Id})/SharedDataSets":
From:
"responses": {
"200": {
"description": "Ok",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/DataSet"
}
}
},
Also, the DataSet item has a Catalog Item. This was also missing a Roles array that was being returned in the response but is not in the definition. I added to the CatalogItem
"Roles": {
"type": "array",
"description": "An array of Role objects that specifies the roles that are allowed to view the CatalogItem.",
"items": {
"$ref": "#/definitions/Role"
}
},
After these changes the client was able to marshal the json into the go objects.
The text was updated successfully, but these errors were encountered:
I'm not sure where the right place to put this issue - The endpoint /Reports({Id})/SharedDataSets does not work with the go client generated from the swagger file. The response models in the swagger file do not match the response from the rest endpoint.
Version Info:
"version": "2.0",
"title": "SQL Server 2017 Reporting Services REST API"
As an example:
The response json from the endpoint returns:
{
"@odata.context": "http://zzzzz.com/Reports/api/v2.0/$metadata#DataSets",
"value": [
{
"Id": "3asdfb1c-e85c-4006-a616-04a5asdf4",
"Name": "Client",
"Description": null,
"Path": "/Datasets/ClientID",
"Type": "DataSet",
"Hidden": false,
"Size": 0,
"ModifiedBy": null,
"ModifiedDate": "0001-01-01T00:00:00Z",
"CreatedBy": null,
"CreatedDate": "0001-01-01T00:00:00Z",
"ParentFolderId": null,
"IsFavorite": false,
"Roles": [],
"ContentType": null,
"Content": "",
"HasParameters": false,
"QueryExecutionTimeOut": 0
}
]
}
You can also see from the swagger documentation that the example does not match the actual response:
https://app.swaggerhub.com/apis/microsoft-rs/ssrs/2.0#/ under Get Reports({Id})/SharedDataSets
In the swagger I had to change the endpoint definition:
for - "/Reports({Id})/SharedDataSets":
From:
"responses": {
"200": {
"description": "Ok",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/DataSet"
}
}
},
To:
"responses": {
"200": {
"description": "Ok",
"schema": {
"$ref": "#/definitions/ODataReportSharedDataSets"
}
and - ODataReportSharedDataSets is
"ODataReportSharedDataSets": {
"type": "object",
"properties": {
"@odata.context": {
"type": "string"
},
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/DataSet"
}
}
}
},
because the result is nested in a value object.
Also, the DataSet item has a Catalog Item. This was also missing a Roles array that was being returned in the response but is not in the definition. I added to the CatalogItem
"Roles": {
"type": "array",
"description": "An array of Role objects that specifies the roles that are allowed to view the CatalogItem.",
"items": {
"$ref": "#/definitions/Role"
}
},
After these changes the client was able to marshal the json into the go objects.
The text was updated successfully, but these errors were encountered: