Skip to content
This repository was archived by the owner on Nov 18, 2025. It is now read-only.

Commit 8a0cf03

Browse files
committed
PATCH: fix swagger syntax
1 parent 2e577ac commit 8a0cf03

File tree

4 files changed

+28
-24
lines changed

4 files changed

+28
-24
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ Class | Method | HTTP request | Description
161161
*bimdata.BcfApi* | [**getFullTopics**](docs/BcfApi.md#getFullTopics) | **GET** /bcf/2.1/projects/{projects_pk}/full-topic |
162162
*bimdata.BcfApi* | [**getSelection**](docs/BcfApi.md#getSelection) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{topics_pk}/viewpoints/{viewpoints_pk}/selection/{id} |
163163
*bimdata.BcfApi* | [**getSelections**](docs/BcfApi.md#getSelections) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{topics_pk}/viewpoints/{viewpoints_pk}/selection |
164-
*bimdata.BcfApi* | [**getSnapshots**](docs/BcfApi.md#getSnapshots) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{topics_pk}/viewpoints/{viewpoints_pk}/snapshot |
164+
*bimdata.BcfApi* | [**getSnapshot**](docs/BcfApi.md#getSnapshot) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{topics_pk}/viewpoints/{viewpoints_pk}/snapshot |
165165
*bimdata.BcfApi* | [**getTopic**](docs/BcfApi.md#getTopic) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{guid} |
166166
*bimdata.BcfApi* | [**getTopics**](docs/BcfApi.md#getTopics) | **GET** /bcf/2.1/projects/{projects_pk}/topics |
167167
*bimdata.BcfApi* | [**getUser**](docs/BcfApi.md#getUser) | **GET** /bcf/2.1/current-user |

docs/BcfApi.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Method | HTTP request | Description
3636
[**getFullTopics**](BcfApi.md#getFullTopics) | **GET** /bcf/2.1/projects/{projects_pk}/full-topic |
3737
[**getSelection**](BcfApi.md#getSelection) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{topics_pk}/viewpoints/{viewpoints_pk}/selection/{id} |
3838
[**getSelections**](BcfApi.md#getSelections) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{topics_pk}/viewpoints/{viewpoints_pk}/selection |
39-
[**getSnapshots**](BcfApi.md#getSnapshots) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{topics_pk}/viewpoints/{viewpoints_pk}/snapshot |
39+
[**getSnapshot**](BcfApi.md#getSnapshot) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{topics_pk}/viewpoints/{viewpoints_pk}/snapshot |
4040
[**getTopic**](BcfApi.md#getTopic) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{guid} |
4141
[**getTopics**](BcfApi.md#getTopics) | **GET** /bcf/2.1/projects/{projects_pk}/topics |
4242
[**getUser**](BcfApi.md#getUser) | **GET** /bcf/2.1/current-user |
@@ -1628,12 +1628,14 @@ Name | Type | Description | Notes
16281628
- **Content-Type**: Not defined
16291629
- **Accept**: application/json
16301630

1631-
<a name="getSnapshots"></a>
1632-
# **getSnapshots**
1633-
> [Snapshot] getSnapshots(projectsPk, topicsPk, viewpointsPk)
1631+
<a name="getSnapshot"></a>
1632+
# **getSnapshot**
1633+
> File getSnapshot(projectsPk, topicsPk, viewpointsPk)
16341634
16351635

16361636

1637+
Retrieve the viewpoint&#39; snapshot
1638+
16371639
### Example
16381640
```javascript
16391641
var bimdata = require('@bimdata/bimdata-api-client');
@@ -1648,7 +1650,7 @@ var apiInstance = new bimdata.BcfApi();
16481650
var projectsPk = "projectsPk_example"; // String |
16491651
var topicsPk = "topicsPk_example"; // String |
16501652
var viewpointsPk = "viewpointsPk_example"; // String |
1651-
apiInstance.getSnapshots(projectsPk, topicsPk, viewpointsPk).then(function(data) {
1653+
apiInstance.getSnapshot(projectsPk, topicsPk, viewpointsPk).then(function(data) {
16521654
console.log('API called successfully. Returned data: ' + data);
16531655
}, function(error) {
16541656
console.error(error);
@@ -1666,7 +1668,7 @@ Name | Type | Description | Notes
16661668

16671669
### Return type
16681670

1669-
[**[Snapshot]**](Snapshot.md)
1671+
**File**
16701672

16711673
### Authorization
16721674

src/api/BcfApi.js

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@
1717
(function(root, factory) {
1818
if (typeof define === 'function' && define.amd) {
1919
// AMD. Register as an anonymous module.
20-
define(['ApiClient', 'model/BcfProject', 'model/Coloring', 'model/Comment', 'model/Component', 'model/Extensions', 'model/SelfUser', 'model/SingleJsonTopic', 'model/Snapshot', 'model/Topic', 'model/Viewpoint', 'model/Visibility'], factory);
20+
define(['ApiClient', 'model/BcfProject', 'model/Coloring', 'model/Comment', 'model/Component', 'model/Extensions', 'model/SelfUser', 'model/SingleJsonTopic', 'model/Topic', 'model/Viewpoint', 'model/Visibility'], factory);
2121
} else if (typeof module === 'object' && module.exports) {
2222
// CommonJS-like environments that support module.exports, like Node.
23-
module.exports = factory(require('../ApiClient'), require('../model/BcfProject'), require('../model/Coloring'), require('../model/Comment'), require('../model/Component'), require('../model/Extensions'), require('../model/SelfUser'), require('../model/SingleJsonTopic'), require('../model/Snapshot'), require('../model/Topic'), require('../model/Viewpoint'), require('../model/Visibility'));
23+
module.exports = factory(require('../ApiClient'), require('../model/BcfProject'), require('../model/Coloring'), require('../model/Comment'), require('../model/Component'), require('../model/Extensions'), require('../model/SelfUser'), require('../model/SingleJsonTopic'), require('../model/Topic'), require('../model/Viewpoint'), require('../model/Visibility'));
2424
} else {
2525
// Browser globals (root is window)
2626
if (!root.bimdata) {
2727
root.bimdata = {};
2828
}
29-
root.bimdata.BcfApi = factory(root.bimdata.ApiClient, root.bimdata.BcfProject, root.bimdata.Coloring, root.bimdata.Comment, root.bimdata.Component, root.bimdata.Extensions, root.bimdata.SelfUser, root.bimdata.SingleJsonTopic, root.bimdata.Snapshot, root.bimdata.Topic, root.bimdata.Viewpoint, root.bimdata.Visibility);
29+
root.bimdata.BcfApi = factory(root.bimdata.ApiClient, root.bimdata.BcfProject, root.bimdata.Coloring, root.bimdata.Comment, root.bimdata.Component, root.bimdata.Extensions, root.bimdata.SelfUser, root.bimdata.SingleJsonTopic, root.bimdata.Topic, root.bimdata.Viewpoint, root.bimdata.Visibility);
3030
}
31-
}(this, function(ApiClient, BcfProject, Coloring, Comment, Component, Extensions, SelfUser, SingleJsonTopic, Snapshot, Topic, Viewpoint, Visibility) {
31+
}(this, function(ApiClient, BcfProject, Coloring, Comment, Component, Extensions, SelfUser, SingleJsonTopic, Topic, Viewpoint, Visibility) {
3232
'use strict';
3333

3434
/**
@@ -2132,27 +2132,28 @@
21322132

21332133

21342134
/**
2135+
* Retrieve the viewpoint&#39; snapshot
21352136
* @param {String} projectsPk
21362137
* @param {String} topicsPk
21372138
* @param {String} viewpointsPk
2138-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/Snapshot>} and HTTP response
2139+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link File} and HTTP response
21392140
*/
2140-
this.getSnapshotsWithHttpInfo = function(projectsPk, topicsPk, viewpointsPk) {
2141+
this.getSnapshotWithHttpInfo = function(projectsPk, topicsPk, viewpointsPk) {
21412142
var postBody = null;
21422143

21432144
// verify the required parameter 'projectsPk' is set
21442145
if (projectsPk === undefined || projectsPk === null) {
2145-
throw new Error("Missing the required parameter 'projectsPk' when calling getSnapshots");
2146+
throw new Error("Missing the required parameter 'projectsPk' when calling getSnapshot");
21462147
}
21472148

21482149
// verify the required parameter 'topicsPk' is set
21492150
if (topicsPk === undefined || topicsPk === null) {
2150-
throw new Error("Missing the required parameter 'topicsPk' when calling getSnapshots");
2151+
throw new Error("Missing the required parameter 'topicsPk' when calling getSnapshot");
21512152
}
21522153

21532154
// verify the required parameter 'viewpointsPk' is set
21542155
if (viewpointsPk === undefined || viewpointsPk === null) {
2155-
throw new Error("Missing the required parameter 'viewpointsPk' when calling getSnapshots");
2156+
throw new Error("Missing the required parameter 'viewpointsPk' when calling getSnapshot");
21562157
}
21572158

21582159

@@ -2173,7 +2174,7 @@
21732174
var authNames = ['Bearer'];
21742175
var contentTypes = [];
21752176
var accepts = ['application/json'];
2176-
var returnType = [Snapshot];
2177+
var returnType = File;
21772178

21782179
return this.apiClient.callApi(
21792180
'/bcf/2.1/projects/{projects_pk}/topics/{topics_pk}/viewpoints/{viewpoints_pk}/snapshot', 'GET',
@@ -2183,13 +2184,14 @@
21832184
}
21842185

21852186
/**
2187+
* Retrieve the viewpoint&#39; snapshot
21862188
* @param {String} projectsPk
21872189
* @param {String} topicsPk
21882190
* @param {String} viewpointsPk
2189-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/Snapshot>}
2191+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link File}
21902192
*/
2191-
this.getSnapshots = function(projectsPk, topicsPk, viewpointsPk) {
2192-
return this.getSnapshotsWithHttpInfo(projectsPk, topicsPk, viewpointsPk)
2193+
this.getSnapshot = function(projectsPk, topicsPk, viewpointsPk) {
2194+
return this.getSnapshotWithHttpInfo(projectsPk, topicsPk, viewpointsPk)
21932195
.then(function(response_and_data) {
21942196
return response_and_data.data;
21952197
});

test/api/BcfApi.spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -371,10 +371,10 @@
371371
done();
372372
});
373373
});
374-
describe('getSnapshots', function() {
375-
it('should call getSnapshots successfully', function(done) {
376-
//uncomment below and update the code to test getSnapshots
377-
//instance.getSnapshots(function(error) {
374+
describe('getSnapshot', function() {
375+
it('should call getSnapshot successfully', function(done) {
376+
//uncomment below and update the code to test getSnapshot
377+
//instance.getSnapshot(function(error) {
378378
// if (error) throw error;
379379
//expect().to.be();
380380
//});

0 commit comments

Comments
 (0)