OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Added file location information to storage API spec
Andreas Pfohlfadcd42ba859
diff --git a/docs/api/apiv3/components/schemas/file_collection_model.yml b/docs/api/apiv3/components/schemas/file_collection_model.ymlindex 4f34338c48b..934a01fe35b 100644--- a/docs/api/apiv3/components/schemas/file_collection_model.yml+++ b/docs/api/apiv3/components/schemas/file_collection_model.yml@@ -14,11 +14,11 @@ allOf:properties:self:allOf:- - $ref: "./link.yml"+ - $ref: './link.yml'- description: |-- This file links collection+ This file collection- **Resource**: FileLinkCollectionReadModel+ **Resource**: FileCollectionModel_embedded:type: objectrequired:@@ -27,7 +27,7 @@ allOf:elements:type: arrayitems:- $ref: './file_link_origin_data_model.yml'+ $ref: './storage_file_model.yml'example:_type: Collection@@ -39,6 +39,7 @@ example:_embedded:elements:- id: 1337+ location: '/data/logo.png'name: logo.pngmimeType: image/pngsize: 16042@@ -47,6 +48,7 @@ example:createdByName: Luke SkywalkerlastModifiedByName: Anakin Skywalker- id: 1338+ location: '1338'name: README.mdmimeType: text/markdownsize: 3742diff --git a/docs/api/apiv3/components/schemas/storage_file_location_model.yml b/docs/api/apiv3/components/schemas/storage_file_location_model.ymlnew file mode 100644index 00000000000..3bfe1122a45--- /dev/null+++ b/docs/api/apiv3/components/schemas/storage_file_location_model.yml@@ -0,0 +1,9 @@+# Schema: StorageFileLocationModel+---+type: object+required:+ - location+properties:+ location:+ type: string+ description: Location identification for file in storagediff --git a/docs/api/apiv3/components/schemas/storage_file_model.yml b/docs/api/apiv3/components/schemas/storage_file_model.ymlnew file mode 100644index 00000000000..2fca7a6ea3e--- /dev/null+++ b/docs/api/apiv3/components/schemas/storage_file_model.yml@@ -0,0 +1,5 @@+# Schema: StorageFileModel+---+allOf:+ - $ref: './file_link_origin_data_model.yml'+ - $ref: './storage_file_location_model.yml'diff --git a/docs/api/apiv3/openapi-spec.yml b/docs/api/apiv3/openapi-spec.ymlindex e965f46d215..d126b94a7e0 100644--- a/docs/api/apiv3/openapi-spec.yml+++ b/docs/api/apiv3/openapi-spec.yml@@ -712,6 +712,10 @@ components:"$ref": "./components/schemas/statuses_model.yml"StorageModel:"$ref": "./components/schemas/storage_model.yml"+ StorageFileModel:+ "$ref": "./components/schemas/storage_file_model.yml"+ StorageFileLocationModel:+ "$ref": "./components/schemas/storage_file_location_model.yml"Time_EntryModel:"$ref": "./components/schemas/time_entry_model.yml"Time_Entry_ActivityModel:diff --git a/docs/api/apiv3/paths/storage_files.yml b/docs/api/apiv3/paths/storage_files.ymlindex 3ea0882d0cf..24fae906cb2 100644--- a/docs/api/apiv3/paths/storage_files.yml+++ b/docs/api/apiv3/paths/storage_files.yml@@ -6,12 +6,12 @@ get:tags:- File linksdescription: |-- Gets a collection of file data from a storage.+ Gets a collection of files from a storage.- If no `root` context was given, the result is the content of the document root. With `root` context given, the- result contains the collections of file data from without the given root file id.+ If no `root` context is given, the result is the content of the document root. With `root` context given, the+ result contains the collections of files from within the given root file id.- If given `root` context is no directory, but a file, the collection contains this file data as a single element.+ If given `root` context is no directory, but a file, the collection contains this file as a single element.parameters:- name: iddescription: Storage id@@ -21,12 +21,12 @@ get:type: integerexample: 1337- name: root- description: Root file id+ description: Root file identificationin: queryrequired: falseschema:type: string- example: 53+ example: '/my/data'responses:'200':description: OK@@ -38,7 +38,7 @@ get:content:application/hal+json:schema:- $ref: "../components/schemas/error_response.yml"+ $ref: '../components/schemas/error_response.yml'example:_type: ErrorerrorIdentifier: urn:openproject-org:api:v3:errors:NotFound@@ -48,4 +48,4 @@ get:- if the storage does not exist or the client does not have sufficient permissions to see it**Required permission:** view file links- - if the document root file id do not exist on the storage+ - if the document root file identification does not exist on the storagediff --git a/frontend/src/app/core/state/storage-files/storage-file.model.ts b/frontend/src/app/core/state/storage-files/storage-file.model.tsindex d9b4387f097..935b78c378d 100644--- a/frontend/src/app/core/state/storage-files/storage-file.model.ts+++ b/frontend/src/app/core/state/storage-files/storage-file.model.ts@@ -32,4 +32,5 @@ import { IFileLinkOriginData } from 'core-app/core/state/file-links/file-link.moexport interface IStorageFile extends IFileLinkOriginData {id:ID;+}