Skip to content

Commit

Permalink
PATCH: fix swagger with project children
Browse files Browse the repository at this point in the history
  • Loading branch information
Bimdata-io committed Oct 24, 2024
1 parent 969e640 commit 00845c2
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 181 deletions.
3 changes: 0 additions & 3 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ docs/ProjectInvitationRequest.md
docs/ProjectRequest.md
docs/ProjectRole.md
docs/ProjectSize.md
docs/ProjectWithChildren.md
docs/Property.md
docs/PropertyDefinition.md
docs/PropertyDefinitionRequest.md
Expand Down Expand Up @@ -411,7 +410,6 @@ src/model/ProjectInvitationRequest.js
src/model/ProjectRequest.js
src/model/ProjectRole.js
src/model/ProjectSize.js
src/model/ProjectWithChildren.js
src/model/Property.js
src/model/PropertyDefinition.js
src/model/PropertyDefinitionRequest.js
Expand Down Expand Up @@ -660,7 +658,6 @@ test/model/ProjectInvitationRequest.spec.js
test/model/ProjectRequest.spec.js
test/model/ProjectRole.spec.js
test/model/ProjectSize.spec.js
test/model/ProjectWithChildren.spec.js
test/model/Property.spec.js
test/model/PropertyDefinition.spec.js
test/model/PropertyDefinitionRequest.spec.js
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,6 @@ Class | Method | HTTP request | Description
- [bimdata.ProjectRequest](docs/ProjectRequest.md)
- [bimdata.ProjectRole](docs/ProjectRole.md)
- [bimdata.ProjectSize](docs/ProjectSize.md)
- [bimdata.ProjectWithChildren](docs/ProjectWithChildren.md)
- [bimdata.Property](docs/Property.md)
- [bimdata.PropertyDefinition](docs/PropertyDefinition.md)
- [bimdata.PropertyDefinitionRequest](docs/PropertyDefinitionRequest.md)
Expand Down
6 changes: 3 additions & 3 deletions docs/CollaborationApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ Name | Type | Description | Notes
Create a document

Create a document. If the document is one of {'DXF', 'IFC', 'POINT_CLOUD', 'GLTF', 'DWG', 'OBJ'}, a model will be created and attached to this document Required scopes: document:write
Create a document. If the document is one of {'GLTF', 'OBJ', 'IFC', 'DWG', 'DXF', 'POINT_CLOUD'}, a model will be created and attached to this document Required scopes: document:write

### Example

Expand Down Expand Up @@ -4137,7 +4137,7 @@ Name | Type | Description | Notes

## getProject

> ProjectWithChildren getProject(cloudPk, id)
> Project getProject(cloudPk, id)
Retrieve a project

Expand Down Expand Up @@ -4186,7 +4186,7 @@ Name | Type | Description | Notes

### Return type

[**ProjectWithChildren**](ProjectWithChildren.md)
[**Project**](Project.md)

### Authorization

Expand Down
29 changes: 0 additions & 29 deletions docs/ProjectWithChildren.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/WriteFolderRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**defaultPermission** | **Number** | Permission for a Folder * `1` - denied * `50` - read_only * `100` - read_write | [optional]
**name** | **String** | Name of the folder |
**parentId** | **Number** | | [optional]
**name** | **String** | Name of the folder |
**children** | [**[WriteFolderRequest]**](WriteFolderRequest.md) | | [optional]


Expand Down
11 changes: 5 additions & 6 deletions src/api/CollaborationApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ import ProjectInvitation from '../model/ProjectInvitation';
import ProjectInvitationRequest from '../model/ProjectInvitationRequest';
import ProjectRequest from '../model/ProjectRequest';
import ProjectSize from '../model/ProjectSize';
import ProjectWithChildren from '../model/ProjectWithChildren';
import SelfUser from '../model/SelfUser';
import Size from '../model/Size';
import Tag from '../model/Tag';
Expand Down Expand Up @@ -867,7 +866,7 @@ export default class CollaborationApi {

/**
* Create a document
* Create a document. If the document is one of {'DXF', 'IFC', 'POINT_CLOUD', 'GLTF', 'DWG', 'OBJ'}, a model will be created and attached to this document Required scopes: document:write
* Create a document. If the document is one of {'GLTF', 'OBJ', 'IFC', 'DWG', 'DXF', 'POINT_CLOUD'}, a model will be created and attached to this document Required scopes: document:write
* @param {Number} cloudPk A unique integer value identifying this cloud.
* @param {Number} projectPk A unique integer value identifying this project.
* @param {String} name Shown name of the file
Expand Down Expand Up @@ -933,7 +932,7 @@ export default class CollaborationApi {

/**
* Create a document
* Create a document. If the document is one of {'DXF', 'IFC', 'POINT_CLOUD', 'GLTF', 'DWG', 'OBJ'}, a model will be created and attached to this document Required scopes: document:write
* Create a document. If the document is one of {'GLTF', 'OBJ', 'IFC', 'DWG', 'DXF', 'POINT_CLOUD'}, a model will be created and attached to this document Required scopes: document:write
* @param {Number} cloudPk A unique integer value identifying this cloud.
* @param {Number} projectPk A unique integer value identifying this project.
* @param {String} name Shown name of the file
Expand Down Expand Up @@ -3920,7 +3919,7 @@ export default class CollaborationApi {
* Retrieve a project
* @param {Number} cloudPk
* @param {Number} id A unique integer value identifying this project.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ProjectWithChildren} and HTTP response
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Project} and HTTP response
*/
getProjectWithHttpInfo(cloudPk, id) {
let postBody = null;
Expand All @@ -3947,7 +3946,7 @@ export default class CollaborationApi {
let authNames = ['ApiKey', 'BIMData_Connect', 'BIMData_Connect', 'Bearer'];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = ProjectWithChildren;
let returnType = Project;
return this.apiClient.callApi(
'/cloud/{cloud_pk}/project/{id}', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
Expand All @@ -3960,7 +3959,7 @@ export default class CollaborationApi {
* Retrieve a project
* @param {Number} cloudPk
* @param {Number} id A unique integer value identifying this project.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ProjectWithChildren}
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Project}
*/
getProject(cloudPk, id) {
return this.getProjectWithHttpInfo(cloudPk, id)
Expand Down
7 changes: 0 additions & 7 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ import ProjectInvitationRequest from './model/ProjectInvitationRequest';
import ProjectRequest from './model/ProjectRequest';
import ProjectRole from './model/ProjectRole';
import ProjectSize from './model/ProjectSize';
import ProjectWithChildren from './model/ProjectWithChildren';
import Property from './model/Property';
import PropertyDefinition from './model/PropertyDefinition';
import PropertyDefinitionRequest from './model/PropertyDefinitionRequest';
Expand Down Expand Up @@ -1208,12 +1207,6 @@ export {
*/
ProjectSize,

/**
* The ProjectWithChildren model constructor.
* @property {module:model/ProjectWithChildren}
*/
ProjectWithChildren,

/**
* The Property model constructor.
* @property {module:model/Property}
Expand Down
16 changes: 8 additions & 8 deletions src/model/WriteFolderRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ class WriteFolderRequest {
if (data.hasOwnProperty('default_permission')) {
obj['default_permission'] = ApiClient.convertToType(data['default_permission'], 'Number');
}
if (data.hasOwnProperty('name')) {
obj['name'] = ApiClient.convertToType(data['name'], 'String');
}
if (data.hasOwnProperty('parent_id')) {
obj['parent_id'] = ApiClient.convertToType(data['parent_id'], 'Number');
}
if (data.hasOwnProperty('name')) {
obj['name'] = ApiClient.convertToType(data['name'], 'String');
}
if (data.hasOwnProperty('children')) {
obj['children'] = ApiClient.convertToType(data['children'], [WriteFolderRequest]);
}
Expand All @@ -75,15 +75,15 @@ class WriteFolderRequest {
WriteFolderRequest.prototype['default_permission'] = undefined;

/**
* Name of the folder
* @member {String} name
* @member {Number} parent_id
*/
WriteFolderRequest.prototype['name'] = undefined;
WriteFolderRequest.prototype['parent_id'] = undefined;

/**
* @member {Number} parent_id
* Name of the folder
* @member {String} name
*/
WriteFolderRequest.prototype['parent_id'] = undefined;
WriteFolderRequest.prototype['name'] = undefined;

/**
* @member {Array.<module:model/WriteFolderRequest>} children
Expand Down
119 changes: 0 additions & 119 deletions test/model/ProjectWithChildren.spec.js

This file was deleted.

8 changes: 4 additions & 4 deletions test/model/WriteFolderRequest.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@
//expect(instance).to.be();
});

it('should have the property name (base name: "name")', function() {
// uncomment below and update the code to test the property name
it('should have the property parentId (base name: "parent_id")', function() {
// uncomment below and update the code to test the property parentId
//var instance = new bimdata.WriteFolderRequest();
//expect(instance).to.be();
});

it('should have the property parentId (base name: "parent_id")', function() {
// uncomment below and update the code to test the property parentId
it('should have the property name (base name: "name")', function() {
// uncomment below and update the code to test the property name
//var instance = new bimdata.WriteFolderRequest();
//expect(instance).to.be();
});
Expand Down

0 comments on commit 00845c2

Please sign in to comment.