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 1d864af commit 7237a4e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 150 deletions.
1 change: 0 additions & 1 deletion package/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ src/models/ProjectInvitationRequest.ts
src/models/ProjectRequest.ts
src/models/ProjectRole.ts
src/models/ProjectSize.ts
src/models/ProjectWithChildren.ts
src/models/Property.ts
src/models/PropertyDefinition.ts
src/models/PropertyDefinitionRequest.ts
Expand Down
13 changes: 5 additions & 8 deletions package/src/apis/CollaborationApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,6 @@ import {
ProjectSize,
ProjectSizeFromJSON,
ProjectSizeToJSON,
ProjectWithChildren,
ProjectWithChildrenFromJSON,
ProjectWithChildrenToJSON,
SelfUser,
SelfUserFromJSON,
SelfUserToJSON,
Expand Down Expand Up @@ -1673,7 +1670,7 @@ export class CollaborationApi extends runtime.BaseAPI {
}

/**
* 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
* Create a document
*/
async createDocumentRaw(requestParameters: CreateDocumentRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Document>> {
Expand Down Expand Up @@ -1776,7 +1773,7 @@ export class CollaborationApi extends runtime.BaseAPI {
}

/**
* 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
* Create a document
*/
async createDocument(cloud_pk: number, project_pk: number, name: string, file: Blob, parent_id?: number | null, file_name?: string, description?: string | null, model_source?: CreateDocumentModelSourceEnum, ifc_source?: CreateDocumentIfcSourceEnum, successor_of?: number, initOverrides?: RequestInit): Promise<Document> {
Expand Down Expand Up @@ -4674,7 +4671,7 @@ export class CollaborationApi extends runtime.BaseAPI {
* Retrieve a project
* Retrieve a project
*/
async getProjectRaw(requestParameters: GetProjectRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<ProjectWithChildren>> {
async getProjectRaw(requestParameters: GetProjectRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Project>> {
if (requestParameters.cloud_pk === null || requestParameters.cloud_pk === undefined) {
throw new runtime.RequiredError('cloud_pk','Required parameter requestParameters.cloud_pk was null or undefined when calling getProject.');
}
Expand Down Expand Up @@ -4712,14 +4709,14 @@ export class CollaborationApi extends runtime.BaseAPI {
query: queryParameters,
}, initOverrides);

return new runtime.JSONApiResponse(response, (jsonValue) => ProjectWithChildrenFromJSON(jsonValue));
return new runtime.JSONApiResponse(response, (jsonValue) => ProjectFromJSON(jsonValue));
}

/**
* Retrieve a project
* Retrieve a project
*/
async getProject(cloud_pk: number, id: number, initOverrides?: RequestInit): Promise<ProjectWithChildren> {
async getProject(cloud_pk: number, id: number, initOverrides?: RequestInit): Promise<Project> {
const response = await this.getProjectRaw({ cloud_pk: cloud_pk, id: id }, initOverrides);
return await response.value();
}
Expand Down
132 changes: 0 additions & 132 deletions package/src/models/ProjectWithChildren.ts

This file was deleted.

16 changes: 8 additions & 8 deletions package/src/models/WriteFolderRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ export interface WriteFolderRequest {
* @memberof WriteFolderRequest
*/
default_permission?: WriteFolderRequestDefaultPermissionEnum;
/**
* Name of the folder
* @type {string}
* @memberof WriteFolderRequest
*/
name: string;
/**
*
* @type {number}
* @memberof WriteFolderRequest
*/
parent_id?: number | null;
/**
* Name of the folder
* @type {string}
* @memberof WriteFolderRequest
*/
name: string;
/**
*
* @type {Array<WriteFolderRequest>}
Expand Down Expand Up @@ -70,8 +70,8 @@ export function WriteFolderRequestFromJSONTyped(json: any, ignoreDiscriminator:
return {

'default_permission': !exists(json, 'default_permission') ? undefined : json['default_permission'],
'name': json['name'],
'parent_id': !exists(json, 'parent_id') ? undefined : json['parent_id'],
'name': json['name'],
'children': !exists(json, 'children') ? undefined : (json['children'] === null ? null : (json['children'] as Array<any>).map(WriteFolderRequestFromJSON)),
};
}
Expand All @@ -86,8 +86,8 @@ export function WriteFolderRequestToJSON(value?: WriteFolderRequest | null): any
return {

'default_permission': value.default_permission,
'name': value.name,
'parent_id': value.parent_id,
'name': value.name,
'children': value.children === undefined ? undefined : (value.children === null ? null : (value.children as Array<any>).map(WriteFolderRequestToJSON)),
};
}
Expand Down
1 change: 0 additions & 1 deletion package/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ export * from './ProjectInvitationRequest';
export * from './ProjectRequest';
export * from './ProjectRole';
export * from './ProjectSize';
export * from './ProjectWithChildren';
export * from './Property';
export * from './PropertyDefinition';
export * from './PropertyDefinitionRequest';
Expand Down

0 comments on commit 7237a4e

Please sign in to comment.