diff --git a/Makefile b/Makefile index a62c059bb7e..a67c944678e 100644 --- a/Makefile +++ b/Makefile @@ -502,7 +502,7 @@ new-service: .venv ## Bakes a new project from cookiecutter-simcore-pyservice an openapi-specs: ## bundles and validates openapi specifications and schemas of ALL service's API @$(MAKE_C) services/web/server $@ @$(MAKE_C) services/storage $@ - @$(MAKE_C) services/director $@ + .PHONY: settings-schema.json settings-schema.json: ## [container] dumps json-schema settings of all services diff --git a/api/specs/common/schemas/Makefile b/api/specs/common/schemas/Makefile index cb1785ccd95..8383bd77cb5 100644 --- a/api/specs/common/schemas/Makefile +++ b/api/specs/common/schemas/Makefile @@ -1,7 +1,9 @@ .PHONY: all build clean help -objects = $(wildcard *.json) -outputs := $(objects:.json=-converted.yaml) +objects = $(wildcard *-pydantic.json) +outputs := $(objects:.json=-converted-clean.yaml) + +depreciated_files = node-meta-v0.0.1-converted.yaml TOOL_IMAGE_NAME := json-schema-to-openapi-schema @@ -15,6 +17,15 @@ all: check $(outputs) -v ${CURDIR}:/output \ $(TOOL_IMAGE_NAME) + rm -f ${depreciated_files} + +.PRECIOUS: %-converted.yaml +%-converted-clean.yaml:%-converted.yaml + # remove the "definition" key from %-converted.yaml + python scripts/remove_definitions.py $^ $@ + + rm -f $^ + # target: check – Checks whether tool is installed check: @docker history $(TOOL_IMAGE_NAME) 2>/dev/null \ diff --git a/api/specs/common/schemas/node-meta-v0.0.1-converted.yaml b/api/specs/common/schemas/node-meta-v0.0.1-converted.yaml deleted file mode 100644 index 6a506cf7107..00000000000 --- a/api/specs/common/schemas/node-meta-v0.0.1-converted.yaml +++ /dev/null @@ -1,348 +0,0 @@ -title: simcore node -description: Description of a simcore node 'class' with input and output -type: object -additionalProperties: false -required: - - key - - version - - type - - name - - description - - authors - - contact - - inputs - - outputs -properties: - key: - type: string - description: distinctive name for the node based on the docker registry path - pattern: ^(simcore)/(services)/(comp|dynamic|frontend)(/[\w/-]+)+$ - example: simcore/services/comp/itis/sleeper - integration-version: - type: string - description: integration version number - pattern: >- - ^(0|[1-9]\d*)(\.(0|[1-9]\d*)){2}(-(0|[1-9]\d*|\d*[-a-zA-Z][-\da-zA-Z]*)(\.(0|[1-9]\d*|\d*[-a-zA-Z][-\da-zA-Z]*))*)?(\+[-\da-zA-Z]+(\.[-\da-zA-Z-]+)*)?$ - example: 1.0.0 - version: - type: string - description: service version number - pattern: >- - ^(0|[1-9]\d*)(\.(0|[1-9]\d*)){2}(-(0|[1-9]\d*|\d*[-a-zA-Z][-\da-zA-Z]*)(\.(0|[1-9]\d*|\d*[-a-zA-Z][-\da-zA-Z]*))*)?(\+[-\da-zA-Z]+(\.[-\da-zA-Z-]+)*)?$ - example: 1.0.0 - type: - type: string - description: service type - enum: - - frontend - - computational - - dynamic - example: computational - name: - type: string - description: short, human readable name for the node - example: Fast Counter - thumbnail: - type: string - description: url to the thumbnail - example: >- - https://user-images.githubusercontent.com/32800795/61083844-ff48fb00-a42c-11e9-8e63-fa2d709c8baf.png - badges: - type: array - items: - type: object - required: - - name - - image - - url - additionalProperties: false - properties: - name: - type: string - description: Name of the subject - example: travis-ci - image: - type: string - description: Url to the shield - example: >- - https://travis-ci.org/ITISFoundation/osparc-simcore.svg?branch=master - url: - type: string - description: Link to status - example: >- - https://travis-ci.org/ITISFoundation/osparc-simcore 'State of CI: - build, test and pushing images' - description: - type: string - description: human readable description of the purpose of the node - example: Our best node type - authors: - type: array - minItems: 1 - items: - type: object - required: - - name - - email - additionalProperties: false - properties: - name: - type: string - description: Name of the author - example: Sun Bak - email: - description: Email address - type: string - format: email - example: sun@sense.eight - affiliation: - description: Affiliation of the author - type: string - example: Sense8 - contact: - type: string - format: email - description: email to correspond to the authors about the node - example: lab@net.flix - inputs: - type: object - description: definition of the inputs of this node - x-patternProperties: - ^[-_a-zA-Z0-9]+$: - type: object - description: all the input configurable for this service - additionalProperties: false - required: - - displayOrder - - label - - description - - type - properties: - displayOrder: - description: >- - DEPRECATED: new display order is taken from the item position. - This property will be removed. - deprecated: true - type: number - label: - type: string - description: short name for the property - example: - - Age - description: - type: string - description: description of the property - example: - - Age in seconds since 1970 - type: - type: string - pattern: >- - ^(number|integer|boolean|string|ref_contentSchema|data:([^/\s,]+/[^/\s,]+|\[[^/\s,]+/[^/\s,]+(,[^/\s]+/[^/,\s]+)*\]))$ - description: >- - data type expected on this input glob matching for data type is - allowed - example: - - number - - boolean - - data:*/* - - data:text/* - - data:[image/jpeg,image/png] - - data:application/json - - >- - data:application/json;schema=https://my-schema/not/really/schema.json - - data:application/vnd.ms-excel - - data:text/plain - - data:application/hdf5 - - data:application/edu.ucdavis@ceclancy.xyz - contentSchema: - title: Content Schema - description: >- - jsonschema of the content at this input/output. Required when - type='ref_contentSchema' - type: object - fileToKeyMap: - description: Place the data associated with the named keys in files - type: object - patternProperties: - .+: - type: string - pattern: ^[-_a-zA-Z0-9]+$ - example: - - dir/input1.txt: key_1 - dir33/input2.txt: key2 - defaultValue: - description: initial value for this input - type: - - string - - number - - integer - - boolean - example: - - Dog - - true - unit: - title: Unit - description: Units of this input value, if a physical quantity - type: string - widget: - description: >- - custom widget to use instead of the default one determined from - the data-type - anyOf: - - type: object - additionalProperties: false - required: - - type - properties: - type: - description: type of the property - type: string - enum: - - TextArea - minHeight: - description: minimum Height of the textarea - type: integer - minimum: 1 - - type: object - additionalProperties: false - required: - - type - - structure - properties: - type: - description: type of the property - type: string - enum: - - SelectBox - structure: - type: array - minItems: 1 - items: - type: object - additionalProperties: false - required: - - key - - label - properties: - key: - type: - - string - - boolean - - number - label: - type: string - example: - - - key: rat - label: The Rat - - key: dog - label: Bello the Dog - additionalProperties: true - outputs: - type: object - description: definition of the outputs of this node - x-patternProperties: - ^[-_a-zA-Z0-9]+$: - type: object - description: all the output produced by this node - additionalProperties: false - required: - - displayOrder - - label - - description - - type - properties: - displayOrder: - type: number - description: use this to numerically sort the properties for display - example: - - 1 - - -0.2 - label: - type: string - description: short name for the property - example: - - Age - description: - type: string - description: description of the property - example: - - Age in seconds since 1970 - type: - type: string - pattern: >- - ^(number|integer|boolean|string|ref_contentSchema|data:[^/\s,]+/[^/\s,]+)$ - description: data type expected on this output - example: - - number - - integer - - boolean - - string - - data:application/json - - 'data:application/vnd.ms-excel ' - - data:text/plain - - data:application/hdf5 - contentSchema: - title: Content Schema - description: >- - jsonschema of this input/output. Required when - type='ref_contentSchema' - type: object - fileToKeyMap: - description: >- - Place the data stored in the named files and store it in the - locations pointed to by the respective output key. - type: object - patternProperties: - .+: - type: string - pattern: ^[-_a-zA-Z0-9]+$ - example: - - dir/input1.txt: key_1 - dir33/input2.txt: key2 - unit: - title: Unit - description: Units of the output value, if a physical quantity - type: string - additionalProperties: true - boot-options: - title: Boot Options - description: >- - Service defined boot options. These get injected in the service as env - variables. - type: object - x-patternProperties: - ^[_a-zA-Z0-9]+$: - title: BootOptionMode - type: object - properties: - label: - title: Label - type: string - description: - title: Description - type: string - default: - title: Default - type: string - items: - title: Items - type: object - additionalProperties: - title: BootOptionItem - type: object - properties: - label: - title: Label - type: string - description: - title: Description - type: string - required: - - label - - description - required: - - label - - description - - default - - items - additionalProperties: true diff --git a/api/specs/common/schemas/node-meta-v0.0.1-pydantic-converted-clean.yaml b/api/specs/common/schemas/node-meta-v0.0.1-pydantic-converted-clean.yaml new file mode 100644 index 00000000000..d5d53587ca6 --- /dev/null +++ b/api/specs/common/schemas/node-meta-v0.0.1-pydantic-converted-clean.yaml @@ -0,0 +1,589 @@ +additionalProperties: false +description: 'Static metadata for a service injected in the image labels + + + This is one to one with node-meta-v0.0.1.json' +example: + authors: + - affiliation: Company + email: smith@company.com + name: John Smith + - affiliation: University + email: brown@uni.edu + name: Richard Brown + contact: smith@company.com + description: oSparc Python Runner + inputs: + input_1: + description: Any code, requirements or data file + displayOrder: 1 + label: Input data + type: data:*/* + integration-version: 1.0.0 + key: simcore/services/comp/osparc-python-runner + name: oSparc Python Runner + outputs: + output_1: + description: All data produced by the script is zipped as output_data.zip + displayOrder: 1 + fileToKeyMap: + output_data.zip: output_1 + label: Output data + type: data:*/* + type: computational + version: 1.7.0 +properties: + authors: + items: + additionalProperties: false + properties: + affiliation: + description: Affiliation of the author + example: Sense8 + title: Affiliation + type: string + email: + description: Email address + example: sun@sense.eight + format: email + title: Email + type: string + name: + description: Name of the author + example: Jim Knopf + title: Name + type: string + required: + - name + - email + title: Author + type: object + minItems: 1 + title: Authors + type: array + badges: + items: + additionalProperties: false + properties: + image: + description: Url to the badge + example: https://travis-ci.org/ITISFoundation/osparc-simcore.svg?branch=master + format: uri + maxLength: 2083 + minLength: 1 + title: Image + type: string + name: + description: Name of the subject + example: travis-ci + title: Name + type: string + url: + description: Link to the status + example: 'https://travis-ci.org/ITISFoundation/osparc-simcore ''State of + CI: build, test and pushing images''' + format: uri + maxLength: 2083 + minLength: 1 + title: Url + type: string + required: + - name + - image + - url + title: Badge + type: object + title: Badges + type: array + boot-options: + additionalProperties: true + description: Service defined boot options. These get injected in the service as + env variables. + title: Boot-Options + type: object + x-patternProperties: + '[a-zA-Z][a-azA-Z0-9_]*': + example: + - default: '0' + description: Start it in web page mode + items: + '0': + description: Tooltip for non Voila boot mode + label: Non Voila + '1': + description: Tooltip for Voila boot mode + label: Voila + label: Boot mode + - default: b + description: Select a theme for the application + items: + a: + description: Using white background + label: Clear + b: + description: Using black and gray tones + label: Dark + label: Application theme + properties: + default: + title: Default + type: string + description: + title: Description + type: string + items: + additionalProperties: + example: + - default: '0' + description: Start it in web page mode + items: + '0': + description: Tooltip for non Voila boot mode + label: Non Voila + '1': + description: Tooltip for Voila boot mode + label: Voila + label: Boot mode + - default: b + description: Select a theme for the application + items: + a: + description: Using white background + label: Clear + b: + description: Using black and gray tones + label: Dark + label: Application theme + properties: + description: + title: Description + type: string + label: + title: Label + type: string + required: + - label + - description + title: BootChoice + type: object + title: Items + type: object + label: + title: Label + type: string + required: + - label + - description + - default + - items + title: BootOption + type: object + contact: + description: email to correspond to the authors about the node + example: lab@net.flix + format: email + title: Contact + type: string + description: + description: human readable description of the purpose of the node + example: Our best node type + title: Description + type: string + inputs: + additionalProperties: true + description: definition of the inputs of this node + title: Inputs + type: object + x-patternProperties: + ^[-_a-zA-Z0-9]+$: + additionalProperties: false + description: Metadata on a service input port + example: + - description: Files downloaded from service connected at the input + displayOrder: 1 + label: Input files - file-wo-widget + type: data:*/* + - defaultValue: 0 + description: Time to wait before completion + displayOrder: 2 + label: Sleep Time - v2 + type: number + unit: second + widget: + details: + minHeight: 3 + type: TextArea + - defaultValue: 0 + description: Time to wait before completion + label: Sleep Time - latest + type: number + unit: second + widget: + details: + minHeight: 3 + type: TextArea + - contentSchema: + items: + type: number + title: list[number] + type: array + description: Some array of numbers + label: array_numbers + type: ref_contentSchema + - contentSchema: + properties: + b: + title: Bool + type: boolean + i: + default: 3 + title: Int + type: integer + s: + title: Str + type: string + required: + - b + - s + title: an object named A + type: object + description: Some object + label: my_object + type: ref_contentSchema + properties: + contentSchema: + description: jsonschema of this input/output. Required when type='ref_contentSchema' + title: Contentschema + type: object + defaultValue: + anyOf: + - type: boolean + - type: integer + - type: number + - type: string + example: + - Dog + - true + title: Defaultvalue + description: + description: description of the property + example: Age in seconds since 1970 + title: Description + type: string + displayOrder: + deprecated: true + description: 'DEPRECATED: new display order is taken from the item position. + This will be removed.' + title: Displayorder + type: number + fileToKeyMap: + description: Place the data associated with the named keys in files + example: + - dir/input1.txt: key_1 + dir33/input2.txt: key2 + patternProperties: + .+: + pattern: ^[-_a-zA-Z0-9]+$ + type: string + title: Filetokeymap + type: object + label: + description: short name for the property + example: Age + title: Label + type: string + type: + description: data type expected on this input glob matching for data type + is allowed + example: + - number + - boolean + - data:*/* + - data:text/* + - data:[image/jpeg,image/png] + - data:application/json + - data:application/json;schema=https://my-schema/not/really/schema.json + - data:application/vnd.ms-excel + - data:text/plain + - data:application/hdf5 + - data:application/edu.ucdavis@ceclancy.xyz + pattern: ^(number|integer|boolean|string|ref_contentSchema|data:([^/\s,]+/[^/\s,]+|\[[^/\s,]+/[^/\s,]+(,[^/\s]+/[^/,\s]+)*\]))$ + title: Type + type: string + unit: + description: Units, when it refers to a physical quantity + title: Unit + type: string + widget: + allOf: + - additionalProperties: false + properties: + details: + anyOf: + - additionalProperties: false + properties: + minHeight: + description: minimum Height of the textarea + exclusiveMinimum: 0 + title: Minheight + type: integer + required: + - minHeight + title: TextArea + type: object + - additionalProperties: false + properties: + structure: + items: + additionalProperties: false + properties: + key: + anyOf: + - type: string + - type: boolean + - type: number + title: Key + label: + title: Label + type: string + required: + - key + - label + title: Structure + type: object + minItems: 1 + title: Structure + type: array + required: + - structure + title: SelectBox + type: object + title: Details + type: + allOf: + - description: An enumeration. + enum: + - TextArea + - SelectBox + title: WidgetType + type: string + description: type of the property + required: + - type + - details + title: Widget + type: object + description: custom widget to use instead of the default one determined + from the data-type + title: Widget + required: + - label + - description + - type + title: ServiceInput + type: object + integration-version: + description: integration version number + example: 1.0.0 + pattern: ^(0|[1-9]\d*)(\.(0|[1-9]\d*)){2}(-(0|[1-9]\d*|\d*[-a-zA-Z][-\da-zA-Z]*)(\.(0|[1-9]\d*|\d*[-a-zA-Z][-\da-zA-Z]*))*)?(\+[-\da-zA-Z]+(\.[-\da-zA-Z-]+)*)?$ + title: Integration-Version + type: string + key: + description: distinctive name for the node based on the docker registry path + example: simcore/services/comp/itis/sleeper + pattern: ^(simcore)/(services)/(comp|dynamic|frontend)(/[\w/-]+)+$ + title: Key + type: string + name: + description: short, human readable name for the node + example: Fast Counter + title: Name + type: string + outputs: + additionalProperties: true + description: definition of the outputs of this node + title: Outputs + type: object + x-patternProperties: + ^[-_a-zA-Z0-9]+$: + additionalProperties: false + description: Base class for service input/outputs + example: + - description: Time the service waited before completion + displayOrder: 2 + label: Time Slept + type: number + - description: Time the service waited before completion + displayOrder: 2 + label: Time Slept - units + type: number + unit: second + - description: Time the service waited before completion + label: Time Slept - w/o displayorder + type: number + unit: second + - description: Output file uploaded from the outputs folder + displayOrder: 4 + label: Output file 1 + type: data:*/* + properties: + contentSchema: + description: jsonschema of this input/output. Required when type='ref_contentSchema' + title: Contentschema + type: object + description: + description: description of the property + example: Age in seconds since 1970 + title: Description + type: string + displayOrder: + deprecated: true + description: 'DEPRECATED: new display order is taken from the item position. + This will be removed.' + title: Displayorder + type: number + fileToKeyMap: + description: Place the data associated with the named keys in files + example: + - dir/input1.txt: key_1 + dir33/input2.txt: key2 + patternProperties: + .+: + pattern: ^[-_a-zA-Z0-9]+$ + type: string + title: Filetokeymap + type: object + label: + description: short name for the property + example: Age + title: Label + type: string + type: + description: data type expected on this input glob matching for data type + is allowed + example: + - number + - boolean + - data:*/* + - data:text/* + - data:[image/jpeg,image/png] + - data:application/json + - data:application/json;schema=https://my-schema/not/really/schema.json + - data:application/vnd.ms-excel + - data:text/plain + - data:application/hdf5 + - data:application/edu.ucdavis@ceclancy.xyz + pattern: ^(number|integer|boolean|string|ref_contentSchema|data:([^/\s,]+/[^/\s,]+|\[[^/\s,]+/[^/\s,]+(,[^/\s]+/[^/,\s]+)*\]))$ + title: Type + type: string + unit: + description: Units, when it refers to a physical quantity + title: Unit + type: string + widget: + allOf: + - additionalProperties: false + properties: + details: + anyOf: + - additionalProperties: false + properties: + minHeight: + description: minimum Height of the textarea + exclusiveMinimum: 0 + title: Minheight + type: integer + required: + - minHeight + title: TextArea + type: object + - additionalProperties: false + properties: + structure: + items: + additionalProperties: false + properties: + key: + anyOf: + - type: string + - type: boolean + - type: number + title: Key + label: + title: Label + type: string + required: + - key + - label + title: Structure + type: object + minItems: 1 + title: Structure + type: array + required: + - structure + title: SelectBox + type: object + title: Details + type: + allOf: + - description: An enumeration. + enum: + - TextArea + - SelectBox + title: WidgetType + type: string + description: type of the property + required: + - type + - details + title: Widget + type: object + deprecated: true + description: custom widget to use instead of the default one determined + from the data-type + title: Widget + required: + - label + - description + - type + title: ServiceOutput + type: object + thumbnail: + description: url to the thumbnail + example: https://user-images.githubusercontent.com/32800795/61083844-ff48fb00-a42c-11e9-8e63-fa2d709c8baf.png + format: uri + maxLength: 2083 + minLength: 1 + title: Thumbnail + type: string + type: + allOf: + - description: An enumeration. + enum: + - computational + - dynamic + - frontend + - backend + title: ServiceType + type: string + description: service type + example: computational + version: + description: service version number + example: 1.0.0 + pattern: ^(0|[1-9]\d*)(\.(0|[1-9]\d*)){2}(-(0|[1-9]\d*|\d*[-a-zA-Z][-\da-zA-Z]*)(\.(0|[1-9]\d*|\d*[-a-zA-Z][-\da-zA-Z]*))*)?(\+[-\da-zA-Z]+(\.[-\da-zA-Z-]+)*)?$ + title: Version + type: string +required: +- name +- description +- key +- version +- type +- authors +- contact +- inputs +- outputs +title: ServiceDockerData +type: object diff --git a/api/specs/common/schemas/node-meta-v0.0.1-pydantic.json b/api/specs/common/schemas/node-meta-v0.0.1-pydantic.json new file mode 100644 index 00000000000..6a5c0c7e6c7 --- /dev/null +++ b/api/specs/common/schemas/node-meta-v0.0.1-pydantic.json @@ -0,0 +1,1823 @@ +{ + "title": "ServiceDockerData", + "description": "Static metadata for a service injected in the image labels\n\nThis is one to one with node-meta-v0.0.1.json", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "short, human readable name for the node", + "example": "Fast Counter", + "type": "string" + }, + "thumbnail": { + "title": "Thumbnail", + "description": "url to the thumbnail", + "examples": [ + "https://user-images.githubusercontent.com/32800795/61083844-ff48fb00-a42c-11e9-8e63-fa2d709c8baf.png" + ], + "minLength": 1, + "maxLength": 2083, + "format": "uri", + "type": "string" + }, + "description": { + "title": "Description", + "description": "human readable description of the purpose of the node", + "examples": [ + "Our best node type", + "The mother of all nodes, makes your numbers shine!" + ], + "type": "string" + }, + "key": { + "title": "Key", + "description": "distinctive name for the node based on the docker registry path", + "pattern": "^(simcore)/(services)/(comp|dynamic|frontend)(/[\\w/-]+)+$", + "examples": [ + "simcore/services/comp/itis/sleeper", + "simcore/services/dynamic/3dviewer" + ], + "type": "string" + }, + "version": { + "title": "Version", + "description": "service version number", + "pattern": "^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){2}(-(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*)(\\.(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*))*)?(\\+[-\\da-zA-Z]+(\\.[-\\da-zA-Z-]+)*)?$", + "examples": [ + "1.0.0", + "0.0.1" + ], + "type": "string" + }, + "integration-version": { + "title": "Integration-Version", + "description": "integration version number", + "pattern": "^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){2}(-(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*)(\\.(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*))*)?(\\+[-\\da-zA-Z]+(\\.[-\\da-zA-Z-]+)*)?$", + "examples": [ + "1.0.0" + ], + "type": "string" + }, + "type": { + "description": "service type", + "examples": [ + "computational" + ], + "allOf": [ + { + "title": "ServiceType", + "description": "An enumeration.", + "enum": [ + "computational", + "dynamic", + "frontend", + "backend" + ], + "type": "string" + } + ] + }, + "badges": { + "title": "Badges", + "type": "array", + "items": { + "title": "Badge", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "Name of the subject", + "examples": [ + "travis-ci", + "coverals.io", + "github.io" + ], + "type": "string" + }, + "image": { + "title": "Image", + "description": "Url to the badge", + "examples": [ + "https://travis-ci.org/ITISFoundation/osparc-simcore.svg?branch=master", + "https://coveralls.io/repos/github/ITISFoundation/osparc-simcore/badge.svg?branch=master", + "https://img.shields.io/website-up-down-green-red/https/itisfoundation.github.io.svg?label=documentation" + ], + "minLength": 1, + "maxLength": 2083, + "format": "uri", + "type": "string" + }, + "url": { + "title": "Url", + "description": "Link to the status", + "examples": [ + "https://travis-ci.org/ITISFoundation/osparc-simcore 'State of CI: build, test and pushing images'", + "https://coveralls.io/github/ITISFoundation/osparc-simcore?branch=master 'Test coverage'", + "https://itisfoundation.github.io/" + ], + "minLength": 1, + "maxLength": 2083, + "format": "uri", + "type": "string" + } + }, + "required": [ + "name", + "image", + "url" + ], + "additionalProperties": false + } + }, + "authors": { + "title": "Authors", + "minItems": 1, + "type": "array", + "items": { + "title": "Author", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "Name of the author", + "example": "Jim Knopf", + "type": "string" + }, + "email": { + "title": "Email", + "description": "Email address", + "examples": [ + "sun@sense.eight", + "deleen@minbar.bab" + ], + "type": "string", + "format": "email" + }, + "affiliation": { + "title": "Affiliation", + "description": "Affiliation of the author", + "examples": [ + "Sense8", + "Babylon 5" + ], + "type": "string" + } + }, + "required": [ + "name", + "email" + ], + "additionalProperties": false + } + }, + "contact": { + "title": "Contact", + "description": "email to correspond to the authors about the node", + "examples": [ + "lab@net.flix" + ], + "type": "string", + "format": "email" + }, + "inputs": { + "title": "Inputs", + "description": "definition of the inputs of this node", + "type": "object", + "patternProperties": { + "^[-_a-zA-Z0-9]+$": { + "title": "ServiceInput", + "description": "Metadata on a service input port", + "type": "object", + "properties": { + "displayOrder": { + "title": "Displayorder", + "description": "DEPRECATED: new display order is taken from the item position. This will be removed.", + "deprecated": true, + "type": "number" + }, + "label": { + "title": "Label", + "description": "short name for the property", + "example": "Age", + "type": "string" + }, + "description": { + "title": "Description", + "description": "description of the property", + "example": "Age in seconds since 1970", + "type": "string" + }, + "type": { + "title": "Type", + "description": "data type expected on this input glob matching for data type is allowed", + "pattern": "^(number|integer|boolean|string|ref_contentSchema|data:([^/\\s,]+/[^/\\s,]+|\\[[^/\\s,]+/[^/\\s,]+(,[^/\\s]+/[^/,\\s]+)*\\]))$", + "examples": [ + "number", + "boolean", + "data:*/*", + "data:text/*", + "data:[image/jpeg,image/png]", + "data:application/json", + "data:application/json;schema=https://my-schema/not/really/schema.json", + "data:application/vnd.ms-excel", + "data:text/plain", + "data:application/hdf5", + "data:application/edu.ucdavis@ceclancy.xyz" + ], + "type": "string" + }, + "contentSchema": { + "title": "Contentschema", + "description": "jsonschema of this input/output. Required when type='ref_contentSchema'", + "type": "object" + }, + "fileToKeyMap": { + "title": "Filetokeymap", + "description": "Place the data associated with the named keys in files", + "examples": [ + { + "dir/input1.txt": "key_1", + "dir33/input2.txt": "key2" + } + ], + "type": "object", + "patternProperties": { + ".+": { + "type": "string", + "pattern": "^[-_a-zA-Z0-9]+$" + } + } + }, + "unit": { + "title": "Unit", + "description": "Units, when it refers to a physical quantity", + "type": "string" + }, + "defaultValue": { + "title": "Defaultvalue", + "examples": [ + "Dog", + true + ], + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "widget": { + "title": "Widget", + "description": "custom widget to use instead of the default one determined from the data-type", + "allOf": [ + { + "title": "Widget", + "type": "object", + "properties": { + "type": { + "description": "type of the property", + "allOf": [ + { + "title": "WidgetType", + "description": "An enumeration.", + "enum": [ + "TextArea", + "SelectBox" + ], + "type": "string" + } + ] + }, + "details": { + "title": "Details", + "anyOf": [ + { + "title": "TextArea", + "type": "object", + "properties": { + "minHeight": { + "title": "Minheight", + "description": "minimum Height of the textarea", + "exclusiveMinimum": 0, + "type": "integer" + } + }, + "required": [ + "minHeight" + ], + "additionalProperties": false + }, + { + "title": "SelectBox", + "type": "object", + "properties": { + "structure": { + "title": "Structure", + "minItems": 1, + "type": "array", + "items": { + "title": "Structure", + "type": "object", + "properties": { + "key": { + "title": "Key", + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "key", + "label" + ], + "additionalProperties": false + } + } + }, + "required": [ + "structure" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "type", + "details" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "label", + "description", + "type" + ], + "additionalProperties": false, + "examples": [ + { + "displayOrder": 1, + "label": "Input files - file-wo-widget", + "description": "Files downloaded from service connected at the input", + "type": "data:*/*" + }, + { + "displayOrder": 2, + "label": "Sleep Time - v2", + "description": "Time to wait before completion", + "type": "number", + "defaultValue": 0, + "unit": "second", + "widget": { + "type": "TextArea", + "details": { + "minHeight": 3 + } + } + }, + { + "label": "Sleep Time - latest", + "description": "Time to wait before completion", + "type": "number", + "defaultValue": 0, + "unit": "second", + "widget": { + "type": "TextArea", + "details": { + "minHeight": 3 + } + } + }, + { + "label": "array_numbers", + "description": "Some array of numbers", + "type": "ref_contentSchema", + "contentSchema": { + "title": "list[number]", + "type": "array", + "items": { + "type": "number" + } + } + }, + { + "label": "my_object", + "description": "Some object", + "type": "ref_contentSchema", + "contentSchema": { + "title": "an object named A", + "type": "object", + "properties": { + "i": { + "title": "Int", + "type": "integer", + "default": 3 + }, + "b": { + "title": "Bool", + "type": "boolean" + }, + "s": { + "title": "Str", + "type": "string" + } + }, + "required": [ + "b", + "s" + ] + } + } + ] + } + } + }, + "outputs": { + "title": "Outputs", + "description": "definition of the outputs of this node", + "type": "object", + "patternProperties": { + "^[-_a-zA-Z0-9]+$": { + "title": "ServiceOutput", + "description": "Base class for service input/outputs", + "type": "object", + "properties": { + "displayOrder": { + "title": "Displayorder", + "description": "DEPRECATED: new display order is taken from the item position. This will be removed.", + "deprecated": true, + "type": "number" + }, + "label": { + "title": "Label", + "description": "short name for the property", + "example": "Age", + "type": "string" + }, + "description": { + "title": "Description", + "description": "description of the property", + "example": "Age in seconds since 1970", + "type": "string" + }, + "type": { + "title": "Type", + "description": "data type expected on this input glob matching for data type is allowed", + "pattern": "^(number|integer|boolean|string|ref_contentSchema|data:([^/\\s,]+/[^/\\s,]+|\\[[^/\\s,]+/[^/\\s,]+(,[^/\\s]+/[^/,\\s]+)*\\]))$", + "examples": [ + "number", + "boolean", + "data:*/*", + "data:text/*", + "data:[image/jpeg,image/png]", + "data:application/json", + "data:application/json;schema=https://my-schema/not/really/schema.json", + "data:application/vnd.ms-excel", + "data:text/plain", + "data:application/hdf5", + "data:application/edu.ucdavis@ceclancy.xyz" + ], + "type": "string" + }, + "contentSchema": { + "title": "Contentschema", + "description": "jsonschema of this input/output. Required when type='ref_contentSchema'", + "type": "object" + }, + "fileToKeyMap": { + "title": "Filetokeymap", + "description": "Place the data associated with the named keys in files", + "examples": [ + { + "dir/input1.txt": "key_1", + "dir33/input2.txt": "key2" + } + ], + "type": "object", + "patternProperties": { + ".+": { + "type": "string", + "pattern": "^[-_a-zA-Z0-9]+$" + } + } + }, + "unit": { + "title": "Unit", + "description": "Units, when it refers to a physical quantity", + "type": "string" + }, + "widget": { + "title": "Widget", + "description": "custom widget to use instead of the default one determined from the data-type", + "deprecated": true, + "allOf": [ + { + "title": "Widget", + "type": "object", + "properties": { + "type": { + "description": "type of the property", + "allOf": [ + { + "title": "WidgetType", + "description": "An enumeration.", + "enum": [ + "TextArea", + "SelectBox" + ], + "type": "string" + } + ] + }, + "details": { + "title": "Details", + "anyOf": [ + { + "title": "TextArea", + "type": "object", + "properties": { + "minHeight": { + "title": "Minheight", + "description": "minimum Height of the textarea", + "exclusiveMinimum": 0, + "type": "integer" + } + }, + "required": [ + "minHeight" + ], + "additionalProperties": false + }, + { + "title": "SelectBox", + "type": "object", + "properties": { + "structure": { + "title": "Structure", + "minItems": 1, + "type": "array", + "items": { + "title": "Structure", + "type": "object", + "properties": { + "key": { + "title": "Key", + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "key", + "label" + ], + "additionalProperties": false + } + } + }, + "required": [ + "structure" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "type", + "details" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "label", + "description", + "type" + ], + "additionalProperties": false, + "examples": [ + { + "displayOrder": 2, + "label": "Time Slept", + "description": "Time the service waited before completion", + "type": "number" + }, + { + "displayOrder": 2, + "label": "Time Slept - units", + "description": "Time the service waited before completion", + "type": "number", + "unit": "second" + }, + { + "label": "Time Slept - w/o displayorder", + "description": "Time the service waited before completion", + "type": "number", + "unit": "second" + }, + { + "label": "Output file 1", + "displayOrder": 4.0, + "description": "Output file uploaded from the outputs folder", + "type": "data:*/*" + } + ] + } + } + }, + "boot-options": { + "title": "Boot-Options", + "description": "Service defined boot options. These get injected in the service as env variables.", + "type": "object", + "patternProperties": { + "[a-zA-Z][a-azA-Z0-9_]*": { + "title": "BootOption", + "type": "object", + "properties": { + "label": { + "title": "Label", + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + }, + "default": { + "title": "Default", + "type": "string" + }, + "items": { + "title": "Items", + "type": "object", + "additionalProperties": { + "title": "BootChoice", + "type": "object", + "properties": { + "label": { + "title": "Label", + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + } + }, + "required": [ + "label", + "description" + ], + "examples": [ + { + "label": "Boot mode", + "description": "Start it in web page mode", + "default": "0", + "items": { + "0": { + "label": "Non Voila", + "description": "Tooltip for non Voila boot mode" + }, + "1": { + "label": "Voila", + "description": "Tooltip for Voila boot mode" + } + } + }, + { + "label": "Application theme", + "description": "Select a theme for the application", + "default": "b", + "items": { + "a": { + "label": "Clear", + "description": "Using white background" + }, + "b": { + "label": "Dark", + "description": "Using black and gray tones" + } + } + } + ] + } + } + }, + "required": [ + "label", + "description", + "default", + "items" + ], + "examples": [ + { + "label": "Boot mode", + "description": "Start it in web page mode", + "default": "0", + "items": { + "0": { + "label": "Non Voila", + "description": "Tooltip for non Voila boot mode" + }, + "1": { + "label": "Voila", + "description": "Tooltip for Voila boot mode" + } + } + }, + { + "label": "Application theme", + "description": "Select a theme for the application", + "default": "b", + "items": { + "a": { + "label": "Clear", + "description": "Using white background" + }, + "b": { + "label": "Dark", + "description": "Using black and gray tones" + } + } + } + ] + } + } + } + }, + "required": [ + "name", + "description", + "key", + "version", + "type", + "authors", + "contact", + "inputs", + "outputs" + ], + "additionalProperties": false, + "examples": [ + { + "name": "oSparc Python Runner", + "key": "simcore/services/comp/osparc-python-runner", + "type": "computational", + "integration-version": "1.0.0", + "version": "1.7.0", + "description": "oSparc Python Runner", + "contact": "smith@company.com", + "authors": [ + { + "name": "John Smith", + "email": "smith@company.com", + "affiliation": "Company" + }, + { + "name": "Richard Brown", + "email": "brown@uni.edu", + "affiliation": "University" + } + ], + "inputs": { + "input_1": { + "displayOrder": 1, + "label": "Input data", + "description": "Any code, requirements or data file", + "type": "data:*/*" + } + }, + "outputs": { + "output_1": { + "displayOrder": 1, + "label": "Output data", + "description": "All data produced by the script is zipped as output_data.zip", + "type": "data:*/*", + "fileToKeyMap": { + "output_data.zip": "output_1" + } + } + } + }, + { + "name": "oSparc Python Runner", + "key": "simcore/services/comp/osparc-python-runner", + "type": "computational", + "integration-version": "1.0.0", + "version": "1.7.0", + "description": "oSparc Python Runner", + "contact": "smith@company.com", + "authors": [ + { + "name": "John Smith", + "email": "smith@company.com", + "affiliation": "Company" + }, + { + "name": "Richard Brown", + "email": "brown@uni.edu", + "affiliation": "University" + } + ], + "inputs": { + "input_1": { + "label": "Input data", + "description": "Any code, requirements or data file", + "type": "data:*/*" + } + }, + "outputs": { + "output_1": { + "label": "Output data", + "description": "All data produced by the script is zipped as output_data.zip", + "type": "data:*/*", + "fileToKeyMap": { + "output_data.zip": "output_1" + } + } + }, + "boot-options": { + "example_service_defined_boot_mode": { + "label": "Boot mode", + "description": "Start it in web page mode", + "default": "0", + "items": { + "0": { + "label": "Non Voila", + "description": "Tooltip for non Voila boot mode" + }, + "1": { + "label": "Voila", + "description": "Tooltip for Voila boot mode" + } + } + }, + "example_service_defined_theme_selection": { + "label": "Application theme", + "description": "Select a theme for the application", + "default": "b", + "items": { + "a": { + "label": "Clear", + "description": "Using white background" + }, + "b": { + "label": "Dark", + "description": "Using black and gray tones" + } + } + } + } + } + ], + "definitions": { + "ServiceType": { + "title": "ServiceType", + "description": "An enumeration.", + "enum": [ + "computational", + "dynamic", + "frontend", + "backend" + ], + "type": "string" + }, + "Badge": { + "title": "Badge", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "Name of the subject", + "examples": [ + "travis-ci", + "coverals.io", + "github.io" + ], + "type": "string" + }, + "image": { + "title": "Image", + "description": "Url to the badge", + "examples": [ + "https://travis-ci.org/ITISFoundation/osparc-simcore.svg?branch=master", + "https://coveralls.io/repos/github/ITISFoundation/osparc-simcore/badge.svg?branch=master", + "https://img.shields.io/website-up-down-green-red/https/itisfoundation.github.io.svg?label=documentation" + ], + "minLength": 1, + "maxLength": 2083, + "format": "uri", + "type": "string" + }, + "url": { + "title": "Url", + "description": "Link to the status", + "examples": [ + "https://travis-ci.org/ITISFoundation/osparc-simcore 'State of CI: build, test and pushing images'", + "https://coveralls.io/github/ITISFoundation/osparc-simcore?branch=master 'Test coverage'", + "https://itisfoundation.github.io/" + ], + "minLength": 1, + "maxLength": 2083, + "format": "uri", + "type": "string" + } + }, + "required": [ + "name", + "image", + "url" + ], + "additionalProperties": false + }, + "Author": { + "title": "Author", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "Name of the author", + "example": "Jim Knopf", + "type": "string" + }, + "email": { + "title": "Email", + "description": "Email address", + "examples": [ + "sun@sense.eight", + "deleen@minbar.bab" + ], + "type": "string", + "format": "email" + }, + "affiliation": { + "title": "Affiliation", + "description": "Affiliation of the author", + "examples": [ + "Sense8", + "Babylon 5" + ], + "type": "string" + } + }, + "required": [ + "name", + "email" + ], + "additionalProperties": false + }, + "WidgetType": { + "title": "WidgetType", + "description": "An enumeration.", + "enum": [ + "TextArea", + "SelectBox" + ], + "type": "string" + }, + "TextArea": { + "title": "TextArea", + "type": "object", + "properties": { + "minHeight": { + "title": "Minheight", + "description": "minimum Height of the textarea", + "exclusiveMinimum": 0, + "type": "integer" + } + }, + "required": [ + "minHeight" + ], + "additionalProperties": false + }, + "Structure": { + "title": "Structure", + "type": "object", + "properties": { + "key": { + "title": "Key", + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "key", + "label" + ], + "additionalProperties": false + }, + "SelectBox": { + "title": "SelectBox", + "type": "object", + "properties": { + "structure": { + "title": "Structure", + "minItems": 1, + "type": "array", + "items": { + "title": "Structure", + "type": "object", + "properties": { + "key": { + "title": "Key", + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "key", + "label" + ], + "additionalProperties": false + } + } + }, + "required": [ + "structure" + ], + "additionalProperties": false + }, + "Widget": { + "title": "Widget", + "type": "object", + "properties": { + "type": { + "description": "type of the property", + "allOf": [ + { + "title": "WidgetType", + "description": "An enumeration.", + "enum": [ + "TextArea", + "SelectBox" + ], + "type": "string" + } + ] + }, + "details": { + "title": "Details", + "anyOf": [ + { + "title": "TextArea", + "type": "object", + "properties": { + "minHeight": { + "title": "Minheight", + "description": "minimum Height of the textarea", + "exclusiveMinimum": 0, + "type": "integer" + } + }, + "required": [ + "minHeight" + ], + "additionalProperties": false + }, + { + "title": "SelectBox", + "type": "object", + "properties": { + "structure": { + "title": "Structure", + "minItems": 1, + "type": "array", + "items": { + "title": "Structure", + "type": "object", + "properties": { + "key": { + "title": "Key", + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "key", + "label" + ], + "additionalProperties": false + } + } + }, + "required": [ + "structure" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "type", + "details" + ], + "additionalProperties": false + }, + "ServiceInput": { + "title": "ServiceInput", + "description": "Metadata on a service input port", + "type": "object", + "properties": { + "displayOrder": { + "title": "Displayorder", + "description": "DEPRECATED: new display order is taken from the item position. This will be removed.", + "deprecated": true, + "type": "number" + }, + "label": { + "title": "Label", + "description": "short name for the property", + "example": "Age", + "type": "string" + }, + "description": { + "title": "Description", + "description": "description of the property", + "example": "Age in seconds since 1970", + "type": "string" + }, + "type": { + "title": "Type", + "description": "data type expected on this input glob matching for data type is allowed", + "pattern": "^(number|integer|boolean|string|ref_contentSchema|data:([^/\\s,]+/[^/\\s,]+|\\[[^/\\s,]+/[^/\\s,]+(,[^/\\s]+/[^/,\\s]+)*\\]))$", + "examples": [ + "number", + "boolean", + "data:*/*", + "data:text/*", + "data:[image/jpeg,image/png]", + "data:application/json", + "data:application/json;schema=https://my-schema/not/really/schema.json", + "data:application/vnd.ms-excel", + "data:text/plain", + "data:application/hdf5", + "data:application/edu.ucdavis@ceclancy.xyz" + ], + "type": "string" + }, + "contentSchema": { + "title": "Contentschema", + "description": "jsonschema of this input/output. Required when type='ref_contentSchema'", + "type": "object" + }, + "fileToKeyMap": { + "title": "Filetokeymap", + "description": "Place the data associated with the named keys in files", + "examples": [ + { + "dir/input1.txt": "key_1", + "dir33/input2.txt": "key2" + } + ], + "type": "object", + "patternProperties": { + ".+": { + "type": "string", + "pattern": "^[-_a-zA-Z0-9]+$" + } + } + }, + "unit": { + "title": "Unit", + "description": "Units, when it refers to a physical quantity", + "type": "string" + }, + "defaultValue": { + "title": "Defaultvalue", + "examples": [ + "Dog", + true + ], + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "widget": { + "title": "Widget", + "description": "custom widget to use instead of the default one determined from the data-type", + "allOf": [ + { + "title": "Widget", + "type": "object", + "properties": { + "type": { + "description": "type of the property", + "allOf": [ + { + "title": "WidgetType", + "description": "An enumeration.", + "enum": [ + "TextArea", + "SelectBox" + ], + "type": "string" + } + ] + }, + "details": { + "title": "Details", + "anyOf": [ + { + "title": "TextArea", + "type": "object", + "properties": { + "minHeight": { + "title": "Minheight", + "description": "minimum Height of the textarea", + "exclusiveMinimum": 0, + "type": "integer" + } + }, + "required": [ + "minHeight" + ], + "additionalProperties": false + }, + { + "title": "SelectBox", + "type": "object", + "properties": { + "structure": { + "title": "Structure", + "minItems": 1, + "type": "array", + "items": { + "title": "Structure", + "type": "object", + "properties": { + "key": { + "title": "Key", + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "key", + "label" + ], + "additionalProperties": false + } + } + }, + "required": [ + "structure" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "type", + "details" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "label", + "description", + "type" + ], + "additionalProperties": false, + "examples": [ + { + "displayOrder": 1, + "label": "Input files - file-wo-widget", + "description": "Files downloaded from service connected at the input", + "type": "data:*/*" + }, + { + "displayOrder": 2, + "label": "Sleep Time - v2", + "description": "Time to wait before completion", + "type": "number", + "defaultValue": 0, + "unit": "second", + "widget": { + "type": "TextArea", + "details": { + "minHeight": 3 + } + } + }, + { + "label": "Sleep Time - latest", + "description": "Time to wait before completion", + "type": "number", + "defaultValue": 0, + "unit": "second", + "widget": { + "type": "TextArea", + "details": { + "minHeight": 3 + } + } + }, + { + "label": "array_numbers", + "description": "Some array of numbers", + "type": "ref_contentSchema", + "contentSchema": { + "title": "list[number]", + "type": "array", + "items": { + "type": "number" + } + } + }, + { + "label": "my_object", + "description": "Some object", + "type": "ref_contentSchema", + "contentSchema": { + "title": "an object named A", + "type": "object", + "properties": { + "i": { + "title": "Int", + "type": "integer", + "default": 3 + }, + "b": { + "title": "Bool", + "type": "boolean" + }, + "s": { + "title": "Str", + "type": "string" + } + }, + "required": [ + "b", + "s" + ] + } + } + ] + }, + "ServiceOutput": { + "title": "ServiceOutput", + "description": "Base class for service input/outputs", + "type": "object", + "properties": { + "displayOrder": { + "title": "Displayorder", + "description": "DEPRECATED: new display order is taken from the item position. This will be removed.", + "deprecated": true, + "type": "number" + }, + "label": { + "title": "Label", + "description": "short name for the property", + "example": "Age", + "type": "string" + }, + "description": { + "title": "Description", + "description": "description of the property", + "example": "Age in seconds since 1970", + "type": "string" + }, + "type": { + "title": "Type", + "description": "data type expected on this input glob matching for data type is allowed", + "pattern": "^(number|integer|boolean|string|ref_contentSchema|data:([^/\\s,]+/[^/\\s,]+|\\[[^/\\s,]+/[^/\\s,]+(,[^/\\s]+/[^/,\\s]+)*\\]))$", + "examples": [ + "number", + "boolean", + "data:*/*", + "data:text/*", + "data:[image/jpeg,image/png]", + "data:application/json", + "data:application/json;schema=https://my-schema/not/really/schema.json", + "data:application/vnd.ms-excel", + "data:text/plain", + "data:application/hdf5", + "data:application/edu.ucdavis@ceclancy.xyz" + ], + "type": "string" + }, + "contentSchema": { + "title": "Contentschema", + "description": "jsonschema of this input/output. Required when type='ref_contentSchema'", + "type": "object" + }, + "fileToKeyMap": { + "title": "Filetokeymap", + "description": "Place the data associated with the named keys in files", + "examples": [ + { + "dir/input1.txt": "key_1", + "dir33/input2.txt": "key2" + } + ], + "type": "object", + "patternProperties": { + ".+": { + "type": "string", + "pattern": "^[-_a-zA-Z0-9]+$" + } + } + }, + "unit": { + "title": "Unit", + "description": "Units, when it refers to a physical quantity", + "type": "string" + }, + "widget": { + "title": "Widget", + "description": "custom widget to use instead of the default one determined from the data-type", + "deprecated": true, + "allOf": [ + { + "title": "Widget", + "type": "object", + "properties": { + "type": { + "description": "type of the property", + "allOf": [ + { + "title": "WidgetType", + "description": "An enumeration.", + "enum": [ + "TextArea", + "SelectBox" + ], + "type": "string" + } + ] + }, + "details": { + "title": "Details", + "anyOf": [ + { + "title": "TextArea", + "type": "object", + "properties": { + "minHeight": { + "title": "Minheight", + "description": "minimum Height of the textarea", + "exclusiveMinimum": 0, + "type": "integer" + } + }, + "required": [ + "minHeight" + ], + "additionalProperties": false + }, + { + "title": "SelectBox", + "type": "object", + "properties": { + "structure": { + "title": "Structure", + "minItems": 1, + "type": "array", + "items": { + "title": "Structure", + "type": "object", + "properties": { + "key": { + "title": "Key", + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "key", + "label" + ], + "additionalProperties": false + } + } + }, + "required": [ + "structure" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "type", + "details" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "label", + "description", + "type" + ], + "additionalProperties": false, + "examples": [ + { + "displayOrder": 2, + "label": "Time Slept", + "description": "Time the service waited before completion", + "type": "number" + }, + { + "displayOrder": 2, + "label": "Time Slept - units", + "description": "Time the service waited before completion", + "type": "number", + "unit": "second" + }, + { + "label": "Time Slept - w/o displayorder", + "description": "Time the service waited before completion", + "type": "number", + "unit": "second" + }, + { + "label": "Output file 1", + "displayOrder": 4.0, + "description": "Output file uploaded from the outputs folder", + "type": "data:*/*" + } + ] + }, + "BootChoice": { + "title": "BootChoice", + "type": "object", + "properties": { + "label": { + "title": "Label", + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + } + }, + "required": [ + "label", + "description" + ], + "examples": [ + { + "label": "Boot mode", + "description": "Start it in web page mode", + "default": "0", + "items": { + "0": { + "label": "Non Voila", + "description": "Tooltip for non Voila boot mode" + }, + "1": { + "label": "Voila", + "description": "Tooltip for Voila boot mode" + } + } + }, + { + "label": "Application theme", + "description": "Select a theme for the application", + "default": "b", + "items": { + "a": { + "label": "Clear", + "description": "Using white background" + }, + "b": { + "label": "Dark", + "description": "Using black and gray tones" + } + } + } + ] + }, + "BootOption": { + "title": "BootOption", + "type": "object", + "properties": { + "label": { + "title": "Label", + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + }, + "default": { + "title": "Default", + "type": "string" + }, + "items": { + "title": "Items", + "type": "object", + "additionalProperties": { + "title": "BootChoice", + "type": "object", + "properties": { + "label": { + "title": "Label", + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + } + }, + "required": [ + "label", + "description" + ], + "examples": [ + { + "label": "Boot mode", + "description": "Start it in web page mode", + "default": "0", + "items": { + "0": { + "label": "Non Voila", + "description": "Tooltip for non Voila boot mode" + }, + "1": { + "label": "Voila", + "description": "Tooltip for Voila boot mode" + } + } + }, + { + "label": "Application theme", + "description": "Select a theme for the application", + "default": "b", + "items": { + "a": { + "label": "Clear", + "description": "Using white background" + }, + "b": { + "label": "Dark", + "description": "Using black and gray tones" + } + } + } + ] + } + } + }, + "required": [ + "label", + "description", + "default", + "items" + ], + "examples": [ + { + "label": "Boot mode", + "description": "Start it in web page mode", + "default": "0", + "items": { + "0": { + "label": "Non Voila", + "description": "Tooltip for non Voila boot mode" + }, + "1": { + "label": "Voila", + "description": "Tooltip for Voila boot mode" + } + } + }, + { + "label": "Application theme", + "description": "Select a theme for the application", + "default": "b", + "items": { + "a": { + "label": "Clear", + "description": "Using white background" + }, + "b": { + "label": "Dark", + "description": "Using black and gray tones" + } + } + } + ] + } + } +} \ No newline at end of file diff --git a/api/specs/common/schemas/project-v0.0.1-converted.yaml b/api/specs/common/schemas/project-v0.0.1-converted.yaml deleted file mode 100644 index 87da6e07177..00000000000 --- a/api/specs/common/schemas/project-v0.0.1-converted.yaml +++ /dev/null @@ -1,558 +0,0 @@ -title: simcore project -description: Description of a simcore project -type: object -additionalProperties: false -required: - - uuid - - name - - description - - prjOwner - - accessRights - - creationDate - - lastChangeDate - - thumbnail - - workbench -properties: - uuid: - type: string - format: uuid - description: project unique identifier - example: 07640335-a91f-468c-ab69-a374fa82078d - name: - type: string - description: project name - example: Temporal Distortion Simulator - description: - type: string - description: longer one-line description about the project - example: Dabbling in temporal transitions ... - prjOwner: - type: string - format: email - description: user email - accessRights: - type: object - description: >- - object containing the GroupID as key and read/write/execution permissions - as value - x-patternProperties: - ^\S+$: - type: object - description: the group id - additionalProperties: false - required: - - read - - write - - delete - properties: - read: - type: boolean - description: gives read access - write: - type: boolean - description: gives write access - delete: - type: boolean - description: gives deletion rights - additionalProperties: true - creationDate: - type: string - description: project creation date - pattern: >- - \d{4}-(12|11|10|0?[1-9])-(31|30|[0-2]?\d)T(2[0-3]|1\d|0?[0-9])(:(\d|[0-5]\d)){2}(\.\d{3})?Z - example: '2018-07-01T11:13:43Z' - lastChangeDate: - type: string - description: last save date - pattern: >- - \d{4}-(12|11|10|0?[1-9])-(31|30|[0-2]?\d)T(2[0-3]|1\d|0?[0-9])(:(\d|[0-5]\d)){2}(\.\d{3})?Z - example: '2018-07-01T11:13:43Z' - thumbnail: - type: string - minLength: 0 - maxLength: 2083 - format: uri - description: url of the latest screenshot of the project - example: https://placeimg.com/171/96/tech/grayscale/?0.jpg - workbench: - type: object - x-patternProperties: - ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?4[0-9a-fA-F]{3}-?[89abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$: - type: object - additionalProperties: false - required: - - key - - version - - label - properties: - key: - type: string - description: distinctive name for the node based on the docker registry path - pattern: ^(simcore)/(services)/(comp|dynamic|frontend)(/[\w/-]+)+$ - example: - - simcore/services/comp/sleeper - - simcore/services/dynamic/3dviewer - - simcore/services/frontend/file-picker - version: - type: string - description: semantic version number of the node - pattern: >- - ^(0|[1-9]\d*)(\.(0|[1-9]\d*)){2}(-(0|[1-9]\d*|\d*[-a-zA-Z][-\da-zA-Z]*)(\.(0|[1-9]\d*|\d*[-a-zA-Z][-\da-zA-Z]*))*)?(\+[-\da-zA-Z]+(\.[-\da-zA-Z-]+)*)?$ - example: - - 1.0.0 - - 0.0.1 - label: - type: string - description: The short name of the node - example: - - JupyterLab - progress: - type: number - maximum: 100 - minimum: 0 - description: the node progress value - thumbnail: - minLength: 0 - maxLength: 2083 - format: uri - type: string - description: url of the latest screenshot of the node - example: - - https://placeimg.com/171/96/tech/grayscale/?0.jpg - runHash: - description: >- - the hex digest of the resolved inputs +outputs hash at the time - when the last outputs were generated - type: - - string - - 'null' - example: - - a4337bc45a8fc544c03f52dc550cd6e1e87021bc896588bd79e901e2 - inputs: - type: object - description: values of input properties - patternProperties: - ^[-_a-zA-Z0-9]+$: - oneOf: - - type: - - integer - - boolean - - string - - number - - 'null' - - type: object - additionalProperties: false - required: - - nodeUuid - - output - properties: - nodeUuid: - type: string - format: uuid - output: - type: string - pattern: ^[-_a-zA-Z0-9]+$ - - type: object - additionalProperties: false - required: - - store - - path - properties: - store: - type: - - string - - integer - dataset: - type: string - path: - type: string - label: - type: string - eTag: - type: string - - type: object - additionalProperties: false - required: - - downloadLink - properties: - downloadLink: - minLength: 1 - maxLength: 65536 - type: string - format: uri - label: - type: string - - type: array - items: {} - inputsUnits: - type: object - description: values of input unit - patternProperties: - ^[-_a-zA-Z0-9]+$: - type: string - example: - - kilo-meter - - milli-second - - micro-gram - - kelvin - inputAccess: - description: map with key - access level pairs - type: object - patternProperties: - ^[-_a-zA-Z0-9]+$: - type: string - enum: - - Invisible - - ReadOnly - - ReadAndWrite - default: ReadAndWrite - example: - - ReadOnly - inputNodes: - type: array - items: - type: string - format: uuid - description: node IDs of where the node is connected to - example: - - nodeUuid1 - - nodeUuid2 - outputs: - default: {} - type: object - patternProperties: - ^[-_a-zA-Z0-9]+$: - oneOf: - - type: - - integer - - boolean - - string - - number - - 'null' - - type: object - additionalProperties: false - required: - - store - - path - properties: - store: - type: - - string - - integer - dataset: - type: string - path: - type: string - label: - type: string - eTag: - type: string - - type: object - additionalProperties: false - required: - - downloadLink - properties: - downloadLink: - minLength: 1 - maxLength: 65536 - type: string - format: uri - label: - type: string - - type: array - items: {} - outputNode: - type: boolean - deprecated: true - outputNodes: - type: array - items: - type: string - format: uuid - description: Used in group-nodes. Node IDs of those connected to the output - example: - - nodeUuid1 - - nodeUuid2 - parent: - type: - - 'null' - - string - format: uuid - description: Parent's (group-nodes') node ID s. - example: - - nodeUuid1 - - nodeUuid2 - position: - type: object - additionalProperties: false - required: - - x - - 'y' - properties: - x: - type: integer - description: The x position - example: - - '12' - 'y': - type: integer - description: The y position - example: - - '15' - deprecated: true - state: - title: NodeState - type: object - properties: - modified: - title: Modified - description: true if the node's outputs need to be re-computed - default: true - type: boolean - dependencies: - title: Dependencies - description: >- - contains the node inputs dependencies if they need to be - computed first - type: array - uniqueItems: true - items: - type: string - format: uuid - currentStatus: - description: the node's current state - default: NOT_STARTED - example: - - RUNNING - - FAILED - enum: - - UNKNOWN - - PUBLISHED - - NOT_STARTED - - PENDING - - STARTED - - RETRY - - SUCCESS - - FAILED - - ABORTED - type: string - additionalProperties: false - bootOptions: - title: Boot Options - description: >- - Some services provide alternative parameters to be injected at - boot time. The user selection should be stored here, and it will - overwrite the services's defaults. - type: object - patternProperties: - '[a-zA-Z][a-azA-Z0-9_]*': - type: string - additionalProperties: true - ui: - type: object - additionalProperties: true - properties: - workbench: - type: object - x-patternProperties: - ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?4[0-9a-fA-F]{3}-?[89abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$: - type: object - additionalProperties: false - required: - - position - properties: - position: - type: object - additionalProperties: false - required: - - x - - 'y' - properties: - x: - type: integer - description: The x position - example: - - '12' - 'y': - type: integer - description: The y position - example: - - '15' - marker: - type: object - additionalProperties: false - required: - - color - properties: - color: - type: string - description: Marker's color - example: - - '#FF0000' - - '#0000FF' - additionalProperties: true - slideshow: - type: object - x-patternProperties: - ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?4[0-9a-fA-F]{3}-?[89abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$: - type: object - additionalProperties: false - required: - - position - properties: - position: - type: integer - description: Slide's position - example: - - 0 - - 2 - instructions: - type: - - string - - 'null' - description: Instructions about what to do in this step - example: - - This is a **sleeper** - - Please, select the config file defined [in this link](asdf) - additionalProperties: true - currentNodeId: - type: string - format: uuid - annotations: - type: object - x-patternProperties: - ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?4[0-9a-fA-F]{3}-?[89abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$: - type: object - additionalProperties: false - required: - - type - - color - - attributes - properties: - type: - type: string - description: Annotation type - example: - - rect - - text - color: - type: string - description: Annotation's color - example: - - '#FF0000' - - '#0000FF' - attributes: - type: object - description: svg attributes - additionalProperties: true - tags: - type: array - items: - type: integer - classifiers: - type: array - description: Contains the reference to the project classifiers - items: - type: string - example: some:id:to:a:classifier - dev: - type: object - description: object used for development purposes only - state: - title: State - description: Project state - anyOf: - - nullable: true - - title: ProjectState - type: object - additionalProperties: false - properties: - locked: - title: Locked - description: The project lock state - allOf: - - title: ProjectLocked - type: object - additionalProperties: false - properties: - value: - title: Value - description: True if the project is locked - type: boolean - owner: - title: Owner - description: If locked, the user that owns the lock - allOf: - - title: Owner - type: object - additionalProperties: false - properties: - user_id: - title: User Id - type: integer - description: >- - Owner's identifier when registered in the user's - database table - example: - - 2 - first_name: - title: First Name - description: Owner first name - example: - - John - type: string - last_name: - title: Last Name - description: Owner last name - example: - - Smith - type: string - required: - - user_id - - first_name - - last_name - status: - title: Status - description: The status of the project - enum: - - CLOSED - - CLOSING - - CLONING - - OPENING - - EXPORTING - - OPENED - type: string - required: - - value - - status - state: - title: State - description: The project running state - allOf: - - title: ProjectRunningState - type: object - additionalProperties: false - properties: - value: - title: RunningState - description: An enumeration. - enum: - - UNKNOWN - - NOT_STARTED - - PUBLISHED - - PENDING - - STARTED - - RETRY - - SUCCESS - - FAILED - - ABORTED - type: string - required: - - value - required: - - locked - - state - quality: - type: object - title: Quality - description: Object containing Quality Assessment related data diff --git a/api/specs/common/schemas/project-v0.0.1-pydantic-converted-clean.yaml b/api/specs/common/schemas/project-v0.0.1-pydantic-converted-clean.yaml new file mode 100644 index 00000000000..527c8a3484f --- /dev/null +++ b/api/specs/common/schemas/project-v0.0.1-pydantic-converted-clean.yaml @@ -0,0 +1,788 @@ +additionalProperties: false +properties: + accessRights: + additionalProperties: true + description: object containing the GroupID as key and read/write/execution permissions + as value + title: Accessrights + type: object + x-patternProperties: + ^\S+$: + additionalProperties: false + properties: + delete: + description: gives deletion rights + title: Delete + type: boolean + read: + description: gives read access + title: Read + type: boolean + write: + description: gives write access + title: Write + type: boolean + required: + - read + - write + - delete + title: AccessRights + type: object + classifiers: + description: Contains the reference to the project classifiers + example: some:id:to:a:classifier + items: + type: string + title: Classifiers + type: array + creationDate: + description: project creation date + example: '2018-07-01T11:13:43Z' + pattern: \d{4}-(12|11|10|0?[1-9])-(31|30|[0-2]?\d)T(2[0-3]|1\d|0?[0-9])(:(\d|[0-5]\d)){2}(\.\d{3})?Z + title: Creationdate + type: string + description: + description: longer one-line description about the project + example: Dabbling in temporal transitions ... + title: Description + type: string + dev: + description: object used for development purposes only + title: Dev + type: object + lastChangeDate: + description: last save date + example: '2018-07-01T11:13:43Z' + pattern: \d{4}-(12|11|10|0?[1-9])-(31|30|[0-2]?\d)T(2[0-3]|1\d|0?[0-9])(:(\d|[0-5]\d)){2}(\.\d{3})?Z + title: Lastchangedate + type: string + name: + description: project name + example: Temporal Distortion Simulator + title: Name + type: string + prjOwner: + description: user email + format: email + title: Prjowner + type: string + quality: + default: {} + description: stores the study quality assessment + title: Quality + type: object + state: + anyOf: + - nullable: true + - additionalProperties: false + properties: + locked: + allOf: + - additionalProperties: false + example: + status: CLOSED + value: false + properties: + owner: + allOf: + - additionalProperties: false + properties: + first_name: + description: Owner first name + example: John + title: First Name + type: string + last_name: + description: Owner last name + example: Smith + title: Last Name + type: string + user_id: + description: Owner's identifier when registered in the user's + database table + example: 2 + title: User Id + type: integer + required: + - user_id + - first_name + - last_name + title: Owner + type: object + description: If locked, the user that owns the lock + title: Owner + status: + allOf: + - description: An enumeration. + enum: + - CLOSED + - CLOSING + - CLONING + - EXPORTING + - OPENING + - OPENED + title: ProjectStatus + type: string + description: The status of the project + value: + description: True if the project is locked + title: Value + type: boolean + required: + - value + - status + title: ProjectLocked + type: object + description: The project lock state + title: Locked + state: + allOf: + - additionalProperties: false + properties: + value: + allOf: + - description: 'State of execution of a project''s computational workflow + + + SEE StateType for task state' + enum: + - UNKNOWN + - PUBLISHED + - NOT_STARTED + - PENDING + - STARTED + - RETRY + - SUCCESS + - FAILED + - ABORTED + title: RunningState + type: string + description: The running state of the project + example: STARTED + required: + - value + title: ProjectRunningState + type: object + description: The project running state + title: State + required: + - locked + - state + title: ProjectState + type: object + tags: + default: [] + items: + type: integer + title: Tags + type: array + thumbnail: + description: url of the project thumbnail + example: https://placeimg.com/171/96/tech/grayscale/?0.jpg + format: uri + maxLength: 2083 + minLength: 0 + title: Thumbnail + type: string + ui: + properties: + annotations: + additionalProperties: true + title: Annotations + type: object + x-patternProperties: + ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$: + additionalProperties: false + example: + - attributes: + height: 26 + width: 117 + x: 415 + y: 100 + color: '#FF0000' + type: rect + - attributes: + text: Hey! + x: 415 + y: 100 + color: '#0000FF' + type: text + properties: + attributes: + description: svg attributes + title: Attributes + type: object + color: + format: color + title: Color + type: string + type: + enum: + - rect + - text + title: Type + type: string + required: + - type + - color + - attributes + title: Annotation + type: object + currentNodeId: + format: uuid + title: Currentnodeid + type: string + slideshow: + additionalProperties: true + title: Slideshow + type: object + x-patternProperties: + ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$: + properties: + instructions: + title: Instructions + type: string + position: + title: Position + type: integer + required: + - position + title: Slideshow + type: object + workbench: + additionalProperties: true + title: Workbench + type: object + x-patternProperties: + ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$: + additionalProperties: false + properties: + marker: + additionalProperties: false + properties: + color: + format: color + title: Color + type: string + required: + - color + title: Marker + type: object + position: + allOf: + - additionalProperties: false + properties: + x: + description: The x position + example: + - '12' + title: X + type: integer + y: + description: The y position + example: + - '15' + title: Y + type: integer + required: + - x + - y + title: Position + type: object + description: The node position in the workbench + title: Position + required: + - position + title: WorkbenchUI + type: object + title: StudyUI + type: object + uuid: + description: project unique identifier + example: 07640335-a91f-468c-ab69-a374fa82078d + format: uuid + title: Uuid + type: string + workbench: + additionalProperties: true + description: Project's pipeline + title: Workbench + type: object + x-patternProperties: + ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$: + additionalProperties: false + properties: + bootOptions: + description: Some services provide alternative parameters to be injected + at boot time. The user selection should be stored here, and it will + overwrite the services's defaults. + patternProperties: + '[a-zA-Z][a-azA-Z0-9_]*': + type: string + title: Bootoptions + type: object + inputAccess: + description: map with key - access level pairs + patternProperties: + ^[-_a-zA-Z0-9]+$: + description: An enumeration. + enum: + - ReadAndWrite + - Invisible + - ReadOnly + title: AccessEnum + type: string + type: object + inputNodes: + description: node IDs of where the node is connected to + items: + format: uuid + type: string + title: Inputnodes + type: array + inputs: + description: values of input properties + patternProperties: + ^[-_a-zA-Z0-9]+$: + anyOf: + - type: boolean + - type: integer + - type: number + - format: json-string + type: string + - type: string + - additionalProperties: false + description: I/O port type to reference to an output port of another + node in the same project + example: + - nodeUuid: da5068e0-8a8d-4fb9-9516-56e5ddaef15b + output: out_2 + properties: + nodeUuid: + description: The node to get the port output from + format: uuid + title: Nodeuuid + type: string + output: + description: The port key in the node given by nodeUuid + pattern: ^[-_a-zA-Z0-9]+$ + title: Output + type: string + required: + - nodeUuid + - output + title: PortLink + type: object + - additionalProperties: false + description: I/O port type to hold a link to a file in simcore S3 + storage + example: + - eTag: 859fda0cb82fc4acb4686510a172d9a9-1 + label: input.txt + path: 94453a6a-c8d4-52b3-a22d-ccbf81f8d636/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt + store: 0 + - eTag: f7e4c7076761a42a871e978c8691c676 + path: 50339632-ee1d-11ec-a0c2-02420a0194e4/23b1522f-225f-5a4c-9158-c4c19a70d4a8/output.h5 + store: '0' + - path: api/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt + store: 0 + - path: 94453a6a-c8d4-52b3-a22d-ccbf81f8d636/d4442ca4-23fd-5b6b-ba6d-0b75f711c109/y_1D.txt + store: 0 + properties: + dataset: + deprecated: true + title: Dataset + type: string + eTag: + description: Entity tag that uniquely represents the file. The + method to generate the tag is not specified (black box). + title: Etag + type: string + label: + description: The real file name + title: Label + type: string + path: + anyOf: + - pattern: ^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\/(.+)$ + type: string + - pattern: ^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$ + type: string + description: The path to the file in the storage provider domain + title: Path + store: + description: 'The store identifier: 0 for simcore S3, 1 for + datcore' + title: Store + type: integer + required: + - store + - path + title: SimCoreFileLink + type: object + - additionalProperties: false + description: I/O port type to hold a link to a file in DATCORE storage + example: + - dataset: N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4 + label: initial_WTstates + path: N:package:32df09ba-e8d6-46da-bd54-f696157de6ce + store: 1 + - dataset: N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4 + label: initial_WTstates + path: N:package:32df09ba-e8d6-46da-bd54-f696157de6ce + store: 1 + properties: + dataset: + description: Unique identifier to access the dataset on datcore + (REQUIRED for datcore) + title: Dataset + type: string + eTag: + description: Entity tag that uniquely represents the file. The + method to generate the tag is not specified (black box). + title: Etag + type: string + label: + description: The real file name + title: Label + type: string + path: + anyOf: + - pattern: ^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\/(.+)$ + type: string + - pattern: ^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$ + type: string + description: The path to the file in the storage provider domain + title: Path + store: + description: 'The store identifier: 0 for simcore S3, 1 for + datcore' + title: Store + type: integer + required: + - store + - path + - label + - dataset + title: DatCoreFileLink + type: object + - additionalProperties: false + description: I/O port type to hold a generic download link to a + file (e.g. S3 pre-signed link, etc) + example: + - downloadLink: https://fakeimg.pl/250x100/ + properties: + downloadLink: + format: uri + maxLength: 65536 + minLength: 1 + title: Downloadlink + type: string + label: + title: Label + type: string + required: + - downloadLink + title: DownloadLink + type: object + - items: {} + type: array + - type: object + title: Inputs + type: object + inputsUnits: + description: Overrides default unit (if any) defined in the service for + each port + patternProperties: + ^[-_a-zA-Z0-9]+$: + type: string + title: Inputsunits + type: object + key: + description: distinctive name for the node based on the docker registry + path + example: + - simcore/services/comp/itis/sleeper + - simcore/services/dynamic/3dviewer + - simcore/services/frontend/file-picker + pattern: ^(simcore)/(services)/(comp|dynamic|frontend)(/[\w/-]+)+$ + title: Key + type: string + label: + description: The short name of the node + example: + - JupyterLab + title: Label + type: string + outputNode: + deprecated: true + title: Outputnode + type: boolean + outputNodes: + description: Used in group-nodes. Node IDs of those connected to the output + items: + format: uuid + type: string + title: Outputnodes + type: array + outputs: + description: values of output properties + patternProperties: + ^[-_a-zA-Z0-9]+$: + anyOf: + - type: boolean + - type: integer + - type: number + - format: json-string + type: string + - type: string + - additionalProperties: false + description: I/O port type to hold a link to a file in simcore S3 + storage + example: + - eTag: 859fda0cb82fc4acb4686510a172d9a9-1 + label: input.txt + path: 94453a6a-c8d4-52b3-a22d-ccbf81f8d636/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt + store: 0 + - eTag: f7e4c7076761a42a871e978c8691c676 + path: 50339632-ee1d-11ec-a0c2-02420a0194e4/23b1522f-225f-5a4c-9158-c4c19a70d4a8/output.h5 + store: '0' + - path: api/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt + store: 0 + - path: 94453a6a-c8d4-52b3-a22d-ccbf81f8d636/d4442ca4-23fd-5b6b-ba6d-0b75f711c109/y_1D.txt + store: 0 + properties: + dataset: + deprecated: true + title: Dataset + type: string + eTag: + description: Entity tag that uniquely represents the file. The + method to generate the tag is not specified (black box). + title: Etag + type: string + label: + description: The real file name + title: Label + type: string + path: + anyOf: + - pattern: ^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\/(.+)$ + type: string + - pattern: ^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$ + type: string + description: The path to the file in the storage provider domain + title: Path + store: + description: 'The store identifier: 0 for simcore S3, 1 for + datcore' + title: Store + type: integer + required: + - store + - path + title: SimCoreFileLink + type: object + - additionalProperties: false + description: I/O port type to hold a link to a file in DATCORE storage + example: + - dataset: N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4 + label: initial_WTstates + path: N:package:32df09ba-e8d6-46da-bd54-f696157de6ce + store: 1 + - dataset: N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4 + label: initial_WTstates + path: N:package:32df09ba-e8d6-46da-bd54-f696157de6ce + store: 1 + properties: + dataset: + description: Unique identifier to access the dataset on datcore + (REQUIRED for datcore) + title: Dataset + type: string + eTag: + description: Entity tag that uniquely represents the file. The + method to generate the tag is not specified (black box). + title: Etag + type: string + label: + description: The real file name + title: Label + type: string + path: + anyOf: + - pattern: ^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\/(.+)$ + type: string + - pattern: ^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$ + type: string + description: The path to the file in the storage provider domain + title: Path + store: + description: 'The store identifier: 0 for simcore S3, 1 for + datcore' + title: Store + type: integer + required: + - store + - path + - label + - dataset + title: DatCoreFileLink + type: object + - additionalProperties: false + description: I/O port type to hold a generic download link to a + file (e.g. S3 pre-signed link, etc) + example: + - downloadLink: https://fakeimg.pl/250x100/ + properties: + downloadLink: + format: uri + maxLength: 65536 + minLength: 1 + title: Downloadlink + type: string + label: + title: Label + type: string + required: + - downloadLink + title: DownloadLink + type: object + - items: {} + type: array + - type: object + title: Outputs + type: object + parent: + anyOf: + - type: 'null' + - description: Parent's (group-nodes') node ID s. Used to group + format: uuid + title: Parent + type: string + position: + allOf: + - additionalProperties: false + properties: + x: + description: The x position + example: + - '12' + title: X + type: integer + y: + description: The y position + example: + - '15' + title: Y + type: integer + required: + - x + - y + title: Position + type: object + deprecated: true + description: Use projects_ui.WorkbenchUI.position instead + title: Position + progress: + description: the node progress value + maximum: 100 + minimum: 0 + title: Progress + type: number + runHash: + anyOf: + - type: 'null' + - description: the hex digest of the resolved inputs +outputs hash at + the time when the last outputs were generated + title: Runhash + type: string + state: + allOf: + - additionalProperties: false + example: + - currentStatus: NOT_STARTED + dependencies: [] + modified: true + - currentStatus: ABORTED + dependencies: + - 42838344-03de-4ce2-8d93-589a5dcdfd05 + modified: true + - currentStatus: SUCCESS + dependencies: [] + modified: false + properties: + currentStatus: + allOf: + - description: 'State of execution of a project''s computational + workflow + + + SEE StateType for task state' + enum: + - UNKNOWN + - PUBLISHED + - NOT_STARTED + - PENDING + - STARTED + - RETRY + - SUCCESS + - FAILED + - ABORTED + title: RunningState + type: string + default: NOT_STARTED + description: the node's current state + dependencies: + description: contains the node inputs dependencies if they need + to be computed first + items: + format: uuid + type: string + title: Dependencies + type: array + uniqueItems: true + modified: + default: true + description: true if the node's outputs need to be re-computed + title: Modified + type: boolean + title: NodeState + type: object + description: The node's state object + title: State + thumbnail: + description: url of the latest screenshot of the node + example: + - https://placeimg.com/171/96/tech/grayscale/?0.jpg + format: uri + maxLength: 2083 + minLength: 0 + title: Thumbnail + type: string + version: + description: semantic version number of the node + example: + - 1.0.0 + - 0.0.1 + pattern: ^(0|[1-9]\d*)(\.(0|[1-9]\d*)){2}(-(0|[1-9]\d*|\d*[-a-zA-Z][-\da-zA-Z]*)(\.(0|[1-9]\d*|\d*[-a-zA-Z][-\da-zA-Z]*))*)?(\+[-\da-zA-Z]+(\.[-\da-zA-Z-]+)*)?$ + title: Version + type: string + required: + - key + - version + - label + title: Node + type: object +required: +- uuid +- name +- description +- thumbnail +- creationDate +- lastChangeDate +- workbench +- prjOwner +- accessRights +title: osparc-simcore project +type: object diff --git a/api/specs/common/schemas/project-v0.0.1-pydantic.json b/api/specs/common/schemas/project-v0.0.1-pydantic.json new file mode 100644 index 00000000000..91a645e4a7a --- /dev/null +++ b/api/specs/common/schemas/project-v0.0.1-pydantic.json @@ -0,0 +1,2724 @@ +{ + "title": "osparc-simcore project", + "type": "object", + "properties": { + "uuid": { + "title": "Uuid", + "description": "project unique identifier", + "examples": [ + "07640335-a91f-468c-ab69-a374fa82078d", + "9bcf8feb-c1b1-41b6-b201-639cd6ccdba8" + ], + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "description": "project name", + "examples": [ + "Temporal Distortion Simulator" + ], + "type": "string" + }, + "description": { + "title": "Description", + "description": "longer one-line description about the project", + "examples": [ + "Dabbling in temporal transitions ..." + ], + "type": "string" + }, + "thumbnail": { + "title": "Thumbnail", + "description": "url of the project thumbnail", + "examples": [ + "https://placeimg.com/171/96/tech/grayscale/?0.jpg" + ], + "minLength": 0, + "maxLength": 2083, + "format": "uri", + "type": "string" + }, + "creationDate": { + "title": "Creationdate", + "description": "project creation date", + "pattern": "\\d{4}-(12|11|10|0?[1-9])-(31|30|[0-2]?\\d)T(2[0-3]|1\\d|0?[0-9])(:(\\d|[0-5]\\d)){2}(\\.\\d{3})?Z", + "examples": [ + "2018-07-01T11:13:43Z" + ], + "type": "string" + }, + "lastChangeDate": { + "title": "Lastchangedate", + "description": "last save date", + "pattern": "\\d{4}-(12|11|10|0?[1-9])-(31|30|[0-2]?\\d)T(2[0-3]|1\\d|0?[0-9])(:(\\d|[0-5]\\d)){2}(\\.\\d{3})?Z", + "examples": [ + "2018-07-01T11:13:43Z" + ], + "type": "string" + }, + "workbench": { + "title": "Workbench", + "description": "Project's pipeline", + "type": "object", + "patternProperties": { + "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$": { + "title": "Node", + "type": "object", + "properties": { + "key": { + "title": "Key", + "description": "distinctive name for the node based on the docker registry path", + "examples": [ + "simcore/services/comp/itis/sleeper", + "simcore/services/dynamic/3dviewer", + "simcore/services/frontend/file-picker" + ], + "pattern": "^(simcore)/(services)/(comp|dynamic|frontend)(/[\\w/-]+)+$", + "type": "string" + }, + "version": { + "title": "Version", + "description": "semantic version number of the node", + "examples": [ + "1.0.0", + "0.0.1" + ], + "pattern": "^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){2}(-(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*)(\\.(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*))*)?(\\+[-\\da-zA-Z]+(\\.[-\\da-zA-Z-]+)*)?$", + "type": "string" + }, + "label": { + "title": "Label", + "description": "The short name of the node", + "examples": [ + "JupyterLab" + ], + "type": "string" + }, + "progress": { + "title": "Progress", + "description": "the node progress value", + "minimum": 0, + "maximum": 100, + "type": "number" + }, + "thumbnail": { + "title": "Thumbnail", + "description": "url of the latest screenshot of the node", + "examples": [ + "https://placeimg.com/171/96/tech/grayscale/?0.jpg" + ], + "minLength": 0, + "maxLength": 2083, + "format": "uri", + "type": "string" + }, + "runHash": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "Runhash", + "description": "the hex digest of the resolved inputs +outputs hash at the time when the last outputs were generated", + "type": "string" + } + ] + }, + "inputs": { + "title": "Inputs", + "description": "values of input properties", + "type": "object", + "patternProperties": { + "^[-_a-zA-Z0-9]+$": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "string", + "format": "json-string" + }, + { + "type": "string" + }, + { + "title": "PortLink", + "description": "I/O port type to reference to an output port of another node in the same project", + "type": "object", + "properties": { + "nodeUuid": { + "title": "Nodeuuid", + "description": "The node to get the port output from", + "type": "string", + "format": "uuid" + }, + "output": { + "title": "Output", + "description": "The port key in the node given by nodeUuid", + "pattern": "^[-_a-zA-Z0-9]+$", + "type": "string" + } + }, + "required": [ + "nodeUuid", + "output" + ], + "additionalProperties": false, + "examples": [ + { + "nodeUuid": "da5068e0-8a8d-4fb9-9516-56e5ddaef15b", + "output": "out_2" + } + ] + }, + { + "title": "SimCoreFileLink", + "description": "I/O port type to hold a link to a file in simcore S3 storage", + "type": "object", + "properties": { + "store": { + "title": "Store", + "description": "The store identifier: 0 for simcore S3, 1 for datcore", + "type": "integer" + }, + "path": { + "title": "Path", + "description": "The path to the file in the storage provider domain", + "anyOf": [ + { + "type": "string", + "pattern": "^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\\/(.+)$" + }, + { + "type": "string", + "pattern": "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + } + ] + }, + "label": { + "title": "Label", + "description": "The real file name", + "type": "string" + }, + "eTag": { + "title": "Etag", + "description": "Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box).", + "type": "string" + }, + "dataset": { + "title": "Dataset", + "deprecated": true, + "type": "string" + } + }, + "required": [ + "store", + "path" + ], + "additionalProperties": false, + "examples": [ + { + "store": 0, + "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt", + "eTag": "859fda0cb82fc4acb4686510a172d9a9-1", + "label": "input.txt" + }, + { + "store": "0", + "path": "50339632-ee1d-11ec-a0c2-02420a0194e4/23b1522f-225f-5a4c-9158-c4c19a70d4a8/output.h5", + "eTag": "f7e4c7076761a42a871e978c8691c676" + }, + { + "store": 0, + "path": "api/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt" + }, + { + "store": 0, + "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/d4442ca4-23fd-5b6b-ba6d-0b75f711c109/y_1D.txt" + } + ] + }, + { + "title": "DatCoreFileLink", + "description": "I/O port type to hold a link to a file in DATCORE storage", + "type": "object", + "properties": { + "store": { + "title": "Store", + "description": "The store identifier: 0 for simcore S3, 1 for datcore", + "type": "integer" + }, + "path": { + "title": "Path", + "description": "The path to the file in the storage provider domain", + "anyOf": [ + { + "type": "string", + "pattern": "^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\\/(.+)$" + }, + { + "type": "string", + "pattern": "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + } + ] + }, + "label": { + "title": "Label", + "description": "The real file name", + "type": "string" + }, + "eTag": { + "title": "Etag", + "description": "Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box).", + "type": "string" + }, + "dataset": { + "title": "Dataset", + "description": "Unique identifier to access the dataset on datcore (REQUIRED for datcore)", + "type": "string" + } + }, + "required": [ + "store", + "path", + "label", + "dataset" + ], + "additionalProperties": false, + "examples": [ + { + "store": 1, + "dataset": "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4", + "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", + "label": "initial_WTstates" + }, + { + "store": 1, + "dataset": "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4", + "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", + "label": "initial_WTstates" + } + ] + }, + { + "title": "DownloadLink", + "description": "I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)", + "type": "object", + "properties": { + "downloadLink": { + "title": "Downloadlink", + "minLength": 1, + "maxLength": 65536, + "format": "uri", + "type": "string" + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "downloadLink" + ], + "additionalProperties": false, + "examples": [ + { + "downloadLink": "https://fakeimg.pl/250x100/" + } + ] + }, + { + "type": "array", + "items": {} + }, + { + "type": "object" + } + ] + } + } + }, + "inputsUnits": { + "title": "Inputsunits", + "description": "Overrides default unit (if any) defined in the service for each port", + "type": "object", + "patternProperties": { + "^[-_a-zA-Z0-9]+$": { + "type": "string" + } + } + }, + "inputAccess": { + "description": "map with key - access level pairs", + "type": "object", + "patternProperties": { + "^[-_a-zA-Z0-9]+$": { + "title": "AccessEnum", + "description": "An enumeration.", + "enum": [ + "ReadAndWrite", + "Invisible", + "ReadOnly" + ], + "type": "string" + } + } + }, + "inputNodes": { + "title": "Inputnodes", + "description": "node IDs of where the node is connected to", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "outputs": { + "title": "Outputs", + "description": "values of output properties", + "type": "object", + "patternProperties": { + "^[-_a-zA-Z0-9]+$": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "string", + "format": "json-string" + }, + { + "type": "string" + }, + { + "title": "SimCoreFileLink", + "description": "I/O port type to hold a link to a file in simcore S3 storage", + "type": "object", + "properties": { + "store": { + "title": "Store", + "description": "The store identifier: 0 for simcore S3, 1 for datcore", + "type": "integer" + }, + "path": { + "title": "Path", + "description": "The path to the file in the storage provider domain", + "anyOf": [ + { + "type": "string", + "pattern": "^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\\/(.+)$" + }, + { + "type": "string", + "pattern": "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + } + ] + }, + "label": { + "title": "Label", + "description": "The real file name", + "type": "string" + }, + "eTag": { + "title": "Etag", + "description": "Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box).", + "type": "string" + }, + "dataset": { + "title": "Dataset", + "deprecated": true, + "type": "string" + } + }, + "required": [ + "store", + "path" + ], + "additionalProperties": false, + "examples": [ + { + "store": 0, + "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt", + "eTag": "859fda0cb82fc4acb4686510a172d9a9-1", + "label": "input.txt" + }, + { + "store": "0", + "path": "50339632-ee1d-11ec-a0c2-02420a0194e4/23b1522f-225f-5a4c-9158-c4c19a70d4a8/output.h5", + "eTag": "f7e4c7076761a42a871e978c8691c676" + }, + { + "store": 0, + "path": "api/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt" + }, + { + "store": 0, + "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/d4442ca4-23fd-5b6b-ba6d-0b75f711c109/y_1D.txt" + } + ] + }, + { + "title": "DatCoreFileLink", + "description": "I/O port type to hold a link to a file in DATCORE storage", + "type": "object", + "properties": { + "store": { + "title": "Store", + "description": "The store identifier: 0 for simcore S3, 1 for datcore", + "type": "integer" + }, + "path": { + "title": "Path", + "description": "The path to the file in the storage provider domain", + "anyOf": [ + { + "type": "string", + "pattern": "^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\\/(.+)$" + }, + { + "type": "string", + "pattern": "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + } + ] + }, + "label": { + "title": "Label", + "description": "The real file name", + "type": "string" + }, + "eTag": { + "title": "Etag", + "description": "Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box).", + "type": "string" + }, + "dataset": { + "title": "Dataset", + "description": "Unique identifier to access the dataset on datcore (REQUIRED for datcore)", + "type": "string" + } + }, + "required": [ + "store", + "path", + "label", + "dataset" + ], + "additionalProperties": false, + "examples": [ + { + "store": 1, + "dataset": "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4", + "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", + "label": "initial_WTstates" + }, + { + "store": 1, + "dataset": "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4", + "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", + "label": "initial_WTstates" + } + ] + }, + { + "title": "DownloadLink", + "description": "I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)", + "type": "object", + "properties": { + "downloadLink": { + "title": "Downloadlink", + "minLength": 1, + "maxLength": 65536, + "format": "uri", + "type": "string" + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "downloadLink" + ], + "additionalProperties": false, + "examples": [ + { + "downloadLink": "https://fakeimg.pl/250x100/" + } + ] + }, + { + "type": "array", + "items": {} + }, + { + "type": "object" + } + ] + } + } + }, + "outputNode": { + "title": "Outputnode", + "deprecated": true, + "type": "boolean" + }, + "outputNodes": { + "title": "Outputnodes", + "description": "Used in group-nodes. Node IDs of those connected to the output", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "parent": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "Parent", + "description": "Parent's (group-nodes') node ID s. Used to group", + "type": "string", + "format": "uuid" + } + ] + }, + "position": { + "title": "Position", + "description": "Use projects_ui.WorkbenchUI.position instead", + "deprecated": true, + "allOf": [ + { + "title": "Position", + "type": "object", + "properties": { + "x": { + "title": "X", + "description": "The x position", + "example": [ + "12" + ], + "type": "integer" + }, + "y": { + "title": "Y", + "description": "The y position", + "example": [ + "15" + ], + "type": "integer" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + ] + }, + "state": { + "title": "State", + "description": "The node's state object", + "allOf": [ + { + "title": "NodeState", + "type": "object", + "properties": { + "modified": { + "title": "Modified", + "description": "true if the node's outputs need to be re-computed", + "default": true, + "type": "boolean" + }, + "dependencies": { + "title": "Dependencies", + "description": "contains the node inputs dependencies if they need to be computed first", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "uniqueItems": true + }, + "currentStatus": { + "description": "the node's current state", + "default": "NOT_STARTED", + "allOf": [ + { + "title": "RunningState", + "description": "State of execution of a project's computational workflow\n\nSEE StateType for task state", + "enum": [ + "UNKNOWN", + "PUBLISHED", + "NOT_STARTED", + "PENDING", + "STARTED", + "RETRY", + "SUCCESS", + "FAILED", + "ABORTED" + ], + "type": "string" + } + ] + } + }, + "additionalProperties": false, + "examples": [ + { + "modified": true, + "dependencies": [], + "currentStatus": "NOT_STARTED" + }, + { + "modified": true, + "dependencies": [ + "42838344-03de-4ce2-8d93-589a5dcdfd05" + ], + "currentStatus": "ABORTED" + }, + { + "modified": false, + "dependencies": [], + "currentStatus": "SUCCESS" + } + ] + } + ] + }, + "bootOptions": { + "title": "Bootoptions", + "description": "Some services provide alternative parameters to be injected at boot time. The user selection should be stored here, and it will overwrite the services's defaults.", + "type": "object", + "patternProperties": { + "[a-zA-Z][a-azA-Z0-9_]*": { + "type": "string" + } + } + } + }, + "required": [ + "key", + "version", + "label" + ], + "additionalProperties": false + } + } + }, + "prjOwner": { + "title": "Prjowner", + "description": "user email", + "type": "string", + "format": "email" + }, + "accessRights": { + "title": "Accessrights", + "description": "object containing the GroupID as key and read/write/execution permissions as value", + "type": "object", + "patternProperties": { + "^\\S+$": { + "title": "AccessRights", + "type": "object", + "properties": { + "read": { + "title": "Read", + "description": "gives read access", + "type": "boolean" + }, + "write": { + "title": "Write", + "description": "gives write access", + "type": "boolean" + }, + "delete": { + "title": "Delete", + "description": "gives deletion rights", + "type": "boolean" + } + }, + "required": [ + "read", + "write", + "delete" + ], + "additionalProperties": false + } + } + }, + "tags": { + "title": "Tags", + "default": [], + "type": "array", + "items": { + "type": "integer" + } + }, + "classifiers": { + "title": "Classifiers", + "description": "Contains the reference to the project classifiers", + "examples": [ + "some:id:to:a:classifier" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "state": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "ProjectState", + "type": "object", + "properties": { + "locked": { + "title": "Locked", + "description": "The project lock state", + "allOf": [ + { + "title": "ProjectLocked", + "type": "object", + "properties": { + "value": { + "title": "Value", + "description": "True if the project is locked", + "type": "boolean" + }, + "owner": { + "title": "Owner", + "description": "If locked, the user that owns the lock", + "allOf": [ + { + "title": "Owner", + "type": "object", + "properties": { + "user_id": { + "title": "User Id", + "description": "Owner's identifier when registered in the user's database table", + "examples": [ + 2 + ], + "type": "integer" + }, + "first_name": { + "title": "First Name", + "description": "Owner first name", + "examples": [ + "John" + ], + "type": "string" + }, + "last_name": { + "title": "Last Name", + "description": "Owner last name", + "examples": [ + "Smith" + ], + "type": "string" + } + }, + "required": [ + "user_id", + "first_name", + "last_name" + ], + "additionalProperties": false + } + ] + }, + "status": { + "description": "The status of the project", + "allOf": [ + { + "title": "ProjectStatus", + "description": "An enumeration.", + "enum": [ + "CLOSED", + "CLOSING", + "CLONING", + "EXPORTING", + "OPENING", + "OPENED" + ], + "type": "string" + } + ] + } + }, + "required": [ + "value", + "status" + ], + "additionalProperties": false, + "examples": [ + { + "value": false, + "status": "CLOSED" + }, + { + "value": true, + "status": "OPENED", + "owner": { + "user_id": 123, + "first_name": "Johnny", + "last_name": "Cash" + } + } + ] + } + ] + }, + "state": { + "title": "State", + "description": "The project running state", + "allOf": [ + { + "title": "ProjectRunningState", + "type": "object", + "properties": { + "value": { + "description": "The running state of the project", + "examples": [ + "STARTED" + ], + "allOf": [ + { + "title": "RunningState", + "description": "State of execution of a project's computational workflow\n\nSEE StateType for task state", + "enum": [ + "UNKNOWN", + "PUBLISHED", + "NOT_STARTED", + "PENDING", + "STARTED", + "RETRY", + "SUCCESS", + "FAILED", + "ABORTED" + ], + "type": "string" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "locked", + "state" + ], + "additionalProperties": false + } + ] + }, + "ui": { + "title": "StudyUI", + "type": "object", + "properties": { + "workbench": { + "title": "Workbench", + "type": "object", + "patternProperties": { + "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$": { + "title": "WorkbenchUI", + "type": "object", + "properties": { + "position": { + "title": "Position", + "description": "The node position in the workbench", + "allOf": [ + { + "title": "Position", + "type": "object", + "properties": { + "x": { + "title": "X", + "description": "The x position", + "example": [ + "12" + ], + "type": "integer" + }, + "y": { + "title": "Y", + "description": "The y position", + "example": [ + "15" + ], + "type": "integer" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + ] + }, + "marker": { + "title": "Marker", + "type": "object", + "properties": { + "color": { + "title": "Color", + "type": "string", + "format": "color" + } + }, + "required": [ + "color" + ], + "additionalProperties": false + } + }, + "required": [ + "position" + ], + "additionalProperties": false + } + } + }, + "slideshow": { + "title": "Slideshow", + "type": "object", + "patternProperties": { + "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$": { + "title": "Slideshow", + "type": "object", + "properties": { + "position": { + "title": "Position", + "type": "integer" + }, + "instructions": { + "title": "Instructions", + "type": "string" + } + }, + "required": [ + "position" + ] + } + } + }, + "currentNodeId": { + "title": "Currentnodeid", + "type": "string", + "format": "uuid" + }, + "annotations": { + "title": "Annotations", + "type": "object", + "patternProperties": { + "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$": { + "title": "Annotation", + "type": "object", + "properties": { + "type": { + "title": "Type", + "enum": [ + "rect", + "text" + ], + "type": "string" + }, + "color": { + "title": "Color", + "type": "string", + "format": "color" + }, + "attributes": { + "title": "Attributes", + "description": "svg attributes", + "type": "object" + } + }, + "required": [ + "type", + "color", + "attributes" + ], + "additionalProperties": false, + "examples": [ + { + "type": "rect", + "color": "#FF0000", + "attributes": { + "x": 415, + "y": 100, + "width": 117, + "height": 26 + } + }, + { + "type": "text", + "color": "#0000FF", + "attributes": { + "x": 415, + "y": 100, + "text": "Hey!" + } + } + ] + } + } + } + } + }, + "quality": { + "title": "Quality", + "description": "stores the study quality assessment", + "default": {}, + "type": "object" + }, + "dev": { + "title": "Dev", + "description": "object used for development purposes only", + "type": "object" + } + }, + "required": [ + "uuid", + "name", + "description", + "thumbnail", + "creationDate", + "lastChangeDate", + "workbench", + "prjOwner", + "accessRights" + ], + "additionalProperties": false, + "definitions": { + "PortLink": { + "title": "PortLink", + "description": "I/O port type to reference to an output port of another node in the same project", + "type": "object", + "properties": { + "nodeUuid": { + "title": "Nodeuuid", + "description": "The node to get the port output from", + "type": "string", + "format": "uuid" + }, + "output": { + "title": "Output", + "description": "The port key in the node given by nodeUuid", + "pattern": "^[-_a-zA-Z0-9]+$", + "type": "string" + } + }, + "required": [ + "nodeUuid", + "output" + ], + "additionalProperties": false, + "examples": [ + { + "nodeUuid": "da5068e0-8a8d-4fb9-9516-56e5ddaef15b", + "output": "out_2" + } + ] + }, + "SimCoreFileLink": { + "title": "SimCoreFileLink", + "description": "I/O port type to hold a link to a file in simcore S3 storage", + "type": "object", + "properties": { + "store": { + "title": "Store", + "description": "The store identifier: 0 for simcore S3, 1 for datcore", + "type": "integer" + }, + "path": { + "title": "Path", + "description": "The path to the file in the storage provider domain", + "anyOf": [ + { + "type": "string", + "pattern": "^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\\/(.+)$" + }, + { + "type": "string", + "pattern": "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + } + ] + }, + "label": { + "title": "Label", + "description": "The real file name", + "type": "string" + }, + "eTag": { + "title": "Etag", + "description": "Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box).", + "type": "string" + }, + "dataset": { + "title": "Dataset", + "deprecated": true, + "type": "string" + } + }, + "required": [ + "store", + "path" + ], + "additionalProperties": false, + "examples": [ + { + "store": 0, + "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt", + "eTag": "859fda0cb82fc4acb4686510a172d9a9-1", + "label": "input.txt" + }, + { + "store": "0", + "path": "50339632-ee1d-11ec-a0c2-02420a0194e4/23b1522f-225f-5a4c-9158-c4c19a70d4a8/output.h5", + "eTag": "f7e4c7076761a42a871e978c8691c676" + }, + { + "store": 0, + "path": "api/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt" + }, + { + "store": 0, + "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/d4442ca4-23fd-5b6b-ba6d-0b75f711c109/y_1D.txt" + } + ] + }, + "DatCoreFileLink": { + "title": "DatCoreFileLink", + "description": "I/O port type to hold a link to a file in DATCORE storage", + "type": "object", + "properties": { + "store": { + "title": "Store", + "description": "The store identifier: 0 for simcore S3, 1 for datcore", + "type": "integer" + }, + "path": { + "title": "Path", + "description": "The path to the file in the storage provider domain", + "anyOf": [ + { + "type": "string", + "pattern": "^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\\/(.+)$" + }, + { + "type": "string", + "pattern": "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + } + ] + }, + "label": { + "title": "Label", + "description": "The real file name", + "type": "string" + }, + "eTag": { + "title": "Etag", + "description": "Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box).", + "type": "string" + }, + "dataset": { + "title": "Dataset", + "description": "Unique identifier to access the dataset on datcore (REQUIRED for datcore)", + "type": "string" + } + }, + "required": [ + "store", + "path", + "label", + "dataset" + ], + "additionalProperties": false, + "examples": [ + { + "store": 1, + "dataset": "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4", + "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", + "label": "initial_WTstates" + }, + { + "store": 1, + "dataset": "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4", + "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", + "label": "initial_WTstates" + } + ] + }, + "DownloadLink": { + "title": "DownloadLink", + "description": "I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)", + "type": "object", + "properties": { + "downloadLink": { + "title": "Downloadlink", + "minLength": 1, + "maxLength": 65536, + "format": "uri", + "type": "string" + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "downloadLink" + ], + "additionalProperties": false, + "examples": [ + { + "downloadLink": "https://fakeimg.pl/250x100/" + } + ] + }, + "AccessEnum": { + "title": "AccessEnum", + "description": "An enumeration.", + "enum": [ + "ReadAndWrite", + "Invisible", + "ReadOnly" + ], + "type": "string" + }, + "Position": { + "title": "Position", + "type": "object", + "properties": { + "x": { + "title": "X", + "description": "The x position", + "example": [ + "12" + ], + "type": "integer" + }, + "y": { + "title": "Y", + "description": "The y position", + "example": [ + "15" + ], + "type": "integer" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "RunningState": { + "title": "RunningState", + "description": "State of execution of a project's computational workflow\n\nSEE StateType for task state", + "enum": [ + "UNKNOWN", + "PUBLISHED", + "NOT_STARTED", + "PENDING", + "STARTED", + "RETRY", + "SUCCESS", + "FAILED", + "ABORTED" + ], + "type": "string" + }, + "NodeState": { + "title": "NodeState", + "type": "object", + "properties": { + "modified": { + "title": "Modified", + "description": "true if the node's outputs need to be re-computed", + "default": true, + "type": "boolean" + }, + "dependencies": { + "title": "Dependencies", + "description": "contains the node inputs dependencies if they need to be computed first", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "uniqueItems": true + }, + "currentStatus": { + "description": "the node's current state", + "default": "NOT_STARTED", + "allOf": [ + { + "title": "RunningState", + "description": "State of execution of a project's computational workflow\n\nSEE StateType for task state", + "enum": [ + "UNKNOWN", + "PUBLISHED", + "NOT_STARTED", + "PENDING", + "STARTED", + "RETRY", + "SUCCESS", + "FAILED", + "ABORTED" + ], + "type": "string" + } + ] + } + }, + "additionalProperties": false, + "examples": [ + { + "modified": true, + "dependencies": [], + "currentStatus": "NOT_STARTED" + }, + { + "modified": true, + "dependencies": [ + "42838344-03de-4ce2-8d93-589a5dcdfd05" + ], + "currentStatus": "ABORTED" + }, + { + "modified": false, + "dependencies": [], + "currentStatus": "SUCCESS" + } + ] + }, + "Node": { + "title": "Node", + "type": "object", + "properties": { + "key": { + "title": "Key", + "description": "distinctive name for the node based on the docker registry path", + "examples": [ + "simcore/services/comp/itis/sleeper", + "simcore/services/dynamic/3dviewer", + "simcore/services/frontend/file-picker" + ], + "pattern": "^(simcore)/(services)/(comp|dynamic|frontend)(/[\\w/-]+)+$", + "type": "string" + }, + "version": { + "title": "Version", + "description": "semantic version number of the node", + "examples": [ + "1.0.0", + "0.0.1" + ], + "pattern": "^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){2}(-(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*)(\\.(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*))*)?(\\+[-\\da-zA-Z]+(\\.[-\\da-zA-Z-]+)*)?$", + "type": "string" + }, + "label": { + "title": "Label", + "description": "The short name of the node", + "examples": [ + "JupyterLab" + ], + "type": "string" + }, + "progress": { + "title": "Progress", + "description": "the node progress value", + "minimum": 0, + "maximum": 100, + "type": "number" + }, + "thumbnail": { + "title": "Thumbnail", + "description": "url of the latest screenshot of the node", + "examples": [ + "https://placeimg.com/171/96/tech/grayscale/?0.jpg" + ], + "minLength": 0, + "maxLength": 2083, + "format": "uri", + "type": "string" + }, + "runHash": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "Runhash", + "description": "the hex digest of the resolved inputs +outputs hash at the time when the last outputs were generated", + "type": "string" + } + ] + }, + "inputs": { + "title": "Inputs", + "description": "values of input properties", + "type": "object", + "patternProperties": { + "^[-_a-zA-Z0-9]+$": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "string", + "format": "json-string" + }, + { + "type": "string" + }, + { + "title": "PortLink", + "description": "I/O port type to reference to an output port of another node in the same project", + "type": "object", + "properties": { + "nodeUuid": { + "title": "Nodeuuid", + "description": "The node to get the port output from", + "type": "string", + "format": "uuid" + }, + "output": { + "title": "Output", + "description": "The port key in the node given by nodeUuid", + "pattern": "^[-_a-zA-Z0-9]+$", + "type": "string" + } + }, + "required": [ + "nodeUuid", + "output" + ], + "additionalProperties": false, + "examples": [ + { + "nodeUuid": "da5068e0-8a8d-4fb9-9516-56e5ddaef15b", + "output": "out_2" + } + ] + }, + { + "title": "SimCoreFileLink", + "description": "I/O port type to hold a link to a file in simcore S3 storage", + "type": "object", + "properties": { + "store": { + "title": "Store", + "description": "The store identifier: 0 for simcore S3, 1 for datcore", + "type": "integer" + }, + "path": { + "title": "Path", + "description": "The path to the file in the storage provider domain", + "anyOf": [ + { + "type": "string", + "pattern": "^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\\/(.+)$" + }, + { + "type": "string", + "pattern": "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + } + ] + }, + "label": { + "title": "Label", + "description": "The real file name", + "type": "string" + }, + "eTag": { + "title": "Etag", + "description": "Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box).", + "type": "string" + }, + "dataset": { + "title": "Dataset", + "deprecated": true, + "type": "string" + } + }, + "required": [ + "store", + "path" + ], + "additionalProperties": false, + "examples": [ + { + "store": 0, + "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt", + "eTag": "859fda0cb82fc4acb4686510a172d9a9-1", + "label": "input.txt" + }, + { + "store": "0", + "path": "50339632-ee1d-11ec-a0c2-02420a0194e4/23b1522f-225f-5a4c-9158-c4c19a70d4a8/output.h5", + "eTag": "f7e4c7076761a42a871e978c8691c676" + }, + { + "store": 0, + "path": "api/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt" + }, + { + "store": 0, + "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/d4442ca4-23fd-5b6b-ba6d-0b75f711c109/y_1D.txt" + } + ] + }, + { + "title": "DatCoreFileLink", + "description": "I/O port type to hold a link to a file in DATCORE storage", + "type": "object", + "properties": { + "store": { + "title": "Store", + "description": "The store identifier: 0 for simcore S3, 1 for datcore", + "type": "integer" + }, + "path": { + "title": "Path", + "description": "The path to the file in the storage provider domain", + "anyOf": [ + { + "type": "string", + "pattern": "^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\\/(.+)$" + }, + { + "type": "string", + "pattern": "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + } + ] + }, + "label": { + "title": "Label", + "description": "The real file name", + "type": "string" + }, + "eTag": { + "title": "Etag", + "description": "Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box).", + "type": "string" + }, + "dataset": { + "title": "Dataset", + "description": "Unique identifier to access the dataset on datcore (REQUIRED for datcore)", + "type": "string" + } + }, + "required": [ + "store", + "path", + "label", + "dataset" + ], + "additionalProperties": false, + "examples": [ + { + "store": 1, + "dataset": "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4", + "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", + "label": "initial_WTstates" + }, + { + "store": 1, + "dataset": "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4", + "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", + "label": "initial_WTstates" + } + ] + }, + { + "title": "DownloadLink", + "description": "I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)", + "type": "object", + "properties": { + "downloadLink": { + "title": "Downloadlink", + "minLength": 1, + "maxLength": 65536, + "format": "uri", + "type": "string" + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "downloadLink" + ], + "additionalProperties": false, + "examples": [ + { + "downloadLink": "https://fakeimg.pl/250x100/" + } + ] + }, + { + "type": "array", + "items": {} + }, + { + "type": "object" + } + ] + } + } + }, + "inputsUnits": { + "title": "Inputsunits", + "description": "Overrides default unit (if any) defined in the service for each port", + "type": "object", + "patternProperties": { + "^[-_a-zA-Z0-9]+$": { + "type": "string" + } + } + }, + "inputAccess": { + "description": "map with key - access level pairs", + "type": "object", + "patternProperties": { + "^[-_a-zA-Z0-9]+$": { + "title": "AccessEnum", + "description": "An enumeration.", + "enum": [ + "ReadAndWrite", + "Invisible", + "ReadOnly" + ], + "type": "string" + } + } + }, + "inputNodes": { + "title": "Inputnodes", + "description": "node IDs of where the node is connected to", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "outputs": { + "title": "Outputs", + "description": "values of output properties", + "type": "object", + "patternProperties": { + "^[-_a-zA-Z0-9]+$": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "string", + "format": "json-string" + }, + { + "type": "string" + }, + { + "title": "SimCoreFileLink", + "description": "I/O port type to hold a link to a file in simcore S3 storage", + "type": "object", + "properties": { + "store": { + "title": "Store", + "description": "The store identifier: 0 for simcore S3, 1 for datcore", + "type": "integer" + }, + "path": { + "title": "Path", + "description": "The path to the file in the storage provider domain", + "anyOf": [ + { + "type": "string", + "pattern": "^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\\/(.+)$" + }, + { + "type": "string", + "pattern": "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + } + ] + }, + "label": { + "title": "Label", + "description": "The real file name", + "type": "string" + }, + "eTag": { + "title": "Etag", + "description": "Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box).", + "type": "string" + }, + "dataset": { + "title": "Dataset", + "deprecated": true, + "type": "string" + } + }, + "required": [ + "store", + "path" + ], + "additionalProperties": false, + "examples": [ + { + "store": 0, + "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt", + "eTag": "859fda0cb82fc4acb4686510a172d9a9-1", + "label": "input.txt" + }, + { + "store": "0", + "path": "50339632-ee1d-11ec-a0c2-02420a0194e4/23b1522f-225f-5a4c-9158-c4c19a70d4a8/output.h5", + "eTag": "f7e4c7076761a42a871e978c8691c676" + }, + { + "store": 0, + "path": "api/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt" + }, + { + "store": 0, + "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/d4442ca4-23fd-5b6b-ba6d-0b75f711c109/y_1D.txt" + } + ] + }, + { + "title": "DatCoreFileLink", + "description": "I/O port type to hold a link to a file in DATCORE storage", + "type": "object", + "properties": { + "store": { + "title": "Store", + "description": "The store identifier: 0 for simcore S3, 1 for datcore", + "type": "integer" + }, + "path": { + "title": "Path", + "description": "The path to the file in the storage provider domain", + "anyOf": [ + { + "type": "string", + "pattern": "^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\\/(.+)$" + }, + { + "type": "string", + "pattern": "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + } + ] + }, + "label": { + "title": "Label", + "description": "The real file name", + "type": "string" + }, + "eTag": { + "title": "Etag", + "description": "Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box).", + "type": "string" + }, + "dataset": { + "title": "Dataset", + "description": "Unique identifier to access the dataset on datcore (REQUIRED for datcore)", + "type": "string" + } + }, + "required": [ + "store", + "path", + "label", + "dataset" + ], + "additionalProperties": false, + "examples": [ + { + "store": 1, + "dataset": "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4", + "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", + "label": "initial_WTstates" + }, + { + "store": 1, + "dataset": "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4", + "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", + "label": "initial_WTstates" + } + ] + }, + { + "title": "DownloadLink", + "description": "I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)", + "type": "object", + "properties": { + "downloadLink": { + "title": "Downloadlink", + "minLength": 1, + "maxLength": 65536, + "format": "uri", + "type": "string" + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "downloadLink" + ], + "additionalProperties": false, + "examples": [ + { + "downloadLink": "https://fakeimg.pl/250x100/" + } + ] + }, + { + "type": "array", + "items": {} + }, + { + "type": "object" + } + ] + } + } + }, + "outputNode": { + "title": "Outputnode", + "deprecated": true, + "type": "boolean" + }, + "outputNodes": { + "title": "Outputnodes", + "description": "Used in group-nodes. Node IDs of those connected to the output", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "parent": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "Parent", + "description": "Parent's (group-nodes') node ID s. Used to group", + "type": "string", + "format": "uuid" + } + ] + }, + "position": { + "title": "Position", + "description": "Use projects_ui.WorkbenchUI.position instead", + "deprecated": true, + "allOf": [ + { + "title": "Position", + "type": "object", + "properties": { + "x": { + "title": "X", + "description": "The x position", + "example": [ + "12" + ], + "type": "integer" + }, + "y": { + "title": "Y", + "description": "The y position", + "example": [ + "15" + ], + "type": "integer" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + ] + }, + "state": { + "title": "State", + "description": "The node's state object", + "allOf": [ + { + "title": "NodeState", + "type": "object", + "properties": { + "modified": { + "title": "Modified", + "description": "true if the node's outputs need to be re-computed", + "default": true, + "type": "boolean" + }, + "dependencies": { + "title": "Dependencies", + "description": "contains the node inputs dependencies if they need to be computed first", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "uniqueItems": true + }, + "currentStatus": { + "description": "the node's current state", + "default": "NOT_STARTED", + "allOf": [ + { + "title": "RunningState", + "description": "State of execution of a project's computational workflow\n\nSEE StateType for task state", + "enum": [ + "UNKNOWN", + "PUBLISHED", + "NOT_STARTED", + "PENDING", + "STARTED", + "RETRY", + "SUCCESS", + "FAILED", + "ABORTED" + ], + "type": "string" + } + ] + } + }, + "additionalProperties": false, + "examples": [ + { + "modified": true, + "dependencies": [], + "currentStatus": "NOT_STARTED" + }, + { + "modified": true, + "dependencies": [ + "42838344-03de-4ce2-8d93-589a5dcdfd05" + ], + "currentStatus": "ABORTED" + }, + { + "modified": false, + "dependencies": [], + "currentStatus": "SUCCESS" + } + ] + } + ] + }, + "bootOptions": { + "title": "Bootoptions", + "description": "Some services provide alternative parameters to be injected at boot time. The user selection should be stored here, and it will overwrite the services's defaults.", + "type": "object", + "patternProperties": { + "[a-zA-Z][a-azA-Z0-9_]*": { + "type": "string" + } + } + } + }, + "required": [ + "key", + "version", + "label" + ], + "additionalProperties": false + }, + "AccessRights": { + "title": "AccessRights", + "type": "object", + "properties": { + "read": { + "title": "Read", + "description": "gives read access", + "type": "boolean" + }, + "write": { + "title": "Write", + "description": "gives write access", + "type": "boolean" + }, + "delete": { + "title": "Delete", + "description": "gives deletion rights", + "type": "boolean" + } + }, + "required": [ + "read", + "write", + "delete" + ], + "additionalProperties": false + }, + "Owner": { + "title": "Owner", + "type": "object", + "properties": { + "user_id": { + "title": "User Id", + "description": "Owner's identifier when registered in the user's database table", + "examples": [ + 2 + ], + "type": "integer" + }, + "first_name": { + "title": "First Name", + "description": "Owner first name", + "examples": [ + "John" + ], + "type": "string" + }, + "last_name": { + "title": "Last Name", + "description": "Owner last name", + "examples": [ + "Smith" + ], + "type": "string" + } + }, + "required": [ + "user_id", + "first_name", + "last_name" + ], + "additionalProperties": false + }, + "ProjectStatus": { + "title": "ProjectStatus", + "description": "An enumeration.", + "enum": [ + "CLOSED", + "CLOSING", + "CLONING", + "EXPORTING", + "OPENING", + "OPENED" + ], + "type": "string" + }, + "ProjectLocked": { + "title": "ProjectLocked", + "type": "object", + "properties": { + "value": { + "title": "Value", + "description": "True if the project is locked", + "type": "boolean" + }, + "owner": { + "title": "Owner", + "description": "If locked, the user that owns the lock", + "allOf": [ + { + "title": "Owner", + "type": "object", + "properties": { + "user_id": { + "title": "User Id", + "description": "Owner's identifier when registered in the user's database table", + "examples": [ + 2 + ], + "type": "integer" + }, + "first_name": { + "title": "First Name", + "description": "Owner first name", + "examples": [ + "John" + ], + "type": "string" + }, + "last_name": { + "title": "Last Name", + "description": "Owner last name", + "examples": [ + "Smith" + ], + "type": "string" + } + }, + "required": [ + "user_id", + "first_name", + "last_name" + ], + "additionalProperties": false + } + ] + }, + "status": { + "description": "The status of the project", + "allOf": [ + { + "title": "ProjectStatus", + "description": "An enumeration.", + "enum": [ + "CLOSED", + "CLOSING", + "CLONING", + "EXPORTING", + "OPENING", + "OPENED" + ], + "type": "string" + } + ] + } + }, + "required": [ + "value", + "status" + ], + "additionalProperties": false, + "examples": [ + { + "value": false, + "status": "CLOSED" + }, + { + "value": true, + "status": "OPENED", + "owner": { + "user_id": 123, + "first_name": "Johnny", + "last_name": "Cash" + } + } + ] + }, + "ProjectRunningState": { + "title": "ProjectRunningState", + "type": "object", + "properties": { + "value": { + "description": "The running state of the project", + "examples": [ + "STARTED" + ], + "allOf": [ + { + "title": "RunningState", + "description": "State of execution of a project's computational workflow\n\nSEE StateType for task state", + "enum": [ + "UNKNOWN", + "PUBLISHED", + "NOT_STARTED", + "PENDING", + "STARTED", + "RETRY", + "SUCCESS", + "FAILED", + "ABORTED" + ], + "type": "string" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "ProjectState": { + "title": "ProjectState", + "type": "object", + "properties": { + "locked": { + "title": "Locked", + "description": "The project lock state", + "allOf": [ + { + "title": "ProjectLocked", + "type": "object", + "properties": { + "value": { + "title": "Value", + "description": "True if the project is locked", + "type": "boolean" + }, + "owner": { + "title": "Owner", + "description": "If locked, the user that owns the lock", + "allOf": [ + { + "title": "Owner", + "type": "object", + "properties": { + "user_id": { + "title": "User Id", + "description": "Owner's identifier when registered in the user's database table", + "examples": [ + 2 + ], + "type": "integer" + }, + "first_name": { + "title": "First Name", + "description": "Owner first name", + "examples": [ + "John" + ], + "type": "string" + }, + "last_name": { + "title": "Last Name", + "description": "Owner last name", + "examples": [ + "Smith" + ], + "type": "string" + } + }, + "required": [ + "user_id", + "first_name", + "last_name" + ], + "additionalProperties": false + } + ] + }, + "status": { + "description": "The status of the project", + "allOf": [ + { + "title": "ProjectStatus", + "description": "An enumeration.", + "enum": [ + "CLOSED", + "CLOSING", + "CLONING", + "EXPORTING", + "OPENING", + "OPENED" + ], + "type": "string" + } + ] + } + }, + "required": [ + "value", + "status" + ], + "additionalProperties": false, + "examples": [ + { + "value": false, + "status": "CLOSED" + }, + { + "value": true, + "status": "OPENED", + "owner": { + "user_id": 123, + "first_name": "Johnny", + "last_name": "Cash" + } + } + ] + } + ] + }, + "state": { + "title": "State", + "description": "The project running state", + "allOf": [ + { + "title": "ProjectRunningState", + "type": "object", + "properties": { + "value": { + "description": "The running state of the project", + "examples": [ + "STARTED" + ], + "allOf": [ + { + "title": "RunningState", + "description": "State of execution of a project's computational workflow\n\nSEE StateType for task state", + "enum": [ + "UNKNOWN", + "PUBLISHED", + "NOT_STARTED", + "PENDING", + "STARTED", + "RETRY", + "SUCCESS", + "FAILED", + "ABORTED" + ], + "type": "string" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "locked", + "state" + ], + "additionalProperties": false + }, + "Marker": { + "title": "Marker", + "type": "object", + "properties": { + "color": { + "title": "Color", + "type": "string", + "format": "color" + } + }, + "required": [ + "color" + ], + "additionalProperties": false + }, + "WorkbenchUI": { + "title": "WorkbenchUI", + "type": "object", + "properties": { + "position": { + "title": "Position", + "description": "The node position in the workbench", + "allOf": [ + { + "title": "Position", + "type": "object", + "properties": { + "x": { + "title": "X", + "description": "The x position", + "example": [ + "12" + ], + "type": "integer" + }, + "y": { + "title": "Y", + "description": "The y position", + "example": [ + "15" + ], + "type": "integer" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + ] + }, + "marker": { + "title": "Marker", + "type": "object", + "properties": { + "color": { + "title": "Color", + "type": "string", + "format": "color" + } + }, + "required": [ + "color" + ], + "additionalProperties": false + } + }, + "required": [ + "position" + ], + "additionalProperties": false + }, + "Slideshow": { + "title": "Slideshow", + "type": "object", + "properties": { + "position": { + "title": "Position", + "type": "integer" + }, + "instructions": { + "title": "Instructions", + "type": "string" + } + }, + "required": [ + "position" + ] + }, + "Annotation": { + "title": "Annotation", + "type": "object", + "properties": { + "type": { + "title": "Type", + "enum": [ + "rect", + "text" + ], + "type": "string" + }, + "color": { + "title": "Color", + "type": "string", + "format": "color" + }, + "attributes": { + "title": "Attributes", + "description": "svg attributes", + "type": "object" + } + }, + "required": [ + "type", + "color", + "attributes" + ], + "additionalProperties": false, + "examples": [ + { + "type": "rect", + "color": "#FF0000", + "attributes": { + "x": 415, + "y": 100, + "width": 117, + "height": 26 + } + }, + { + "type": "text", + "color": "#0000FF", + "attributes": { + "x": 415, + "y": 100, + "text": "Hey!" + } + } + ] + }, + "StudyUI": { + "title": "StudyUI", + "type": "object", + "properties": { + "workbench": { + "title": "Workbench", + "type": "object", + "patternProperties": { + "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$": { + "title": "WorkbenchUI", + "type": "object", + "properties": { + "position": { + "title": "Position", + "description": "The node position in the workbench", + "allOf": [ + { + "title": "Position", + "type": "object", + "properties": { + "x": { + "title": "X", + "description": "The x position", + "example": [ + "12" + ], + "type": "integer" + }, + "y": { + "title": "Y", + "description": "The y position", + "example": [ + "15" + ], + "type": "integer" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + ] + }, + "marker": { + "title": "Marker", + "type": "object", + "properties": { + "color": { + "title": "Color", + "type": "string", + "format": "color" + } + }, + "required": [ + "color" + ], + "additionalProperties": false + } + }, + "required": [ + "position" + ], + "additionalProperties": false + } + } + }, + "slideshow": { + "title": "Slideshow", + "type": "object", + "patternProperties": { + "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$": { + "title": "Slideshow", + "type": "object", + "properties": { + "position": { + "title": "Position", + "type": "integer" + }, + "instructions": { + "title": "Instructions", + "type": "string" + } + }, + "required": [ + "position" + ] + } + } + }, + "currentNodeId": { + "title": "Currentnodeid", + "type": "string", + "format": "uuid" + }, + "annotations": { + "title": "Annotations", + "type": "object", + "patternProperties": { + "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$": { + "title": "Annotation", + "type": "object", + "properties": { + "type": { + "title": "Type", + "enum": [ + "rect", + "text" + ], + "type": "string" + }, + "color": { + "title": "Color", + "type": "string", + "format": "color" + }, + "attributes": { + "title": "Attributes", + "description": "svg attributes", + "type": "object" + } + }, + "required": [ + "type", + "color", + "attributes" + ], + "additionalProperties": false, + "examples": [ + { + "type": "rect", + "color": "#FF0000", + "attributes": { + "x": 415, + "y": 100, + "width": 117, + "height": 26 + } + }, + { + "type": "text", + "color": "#0000FF", + "attributes": { + "x": 415, + "y": 100, + "text": "Hey!" + } + } + ] + } + } + } + } + } + } +} diff --git a/api/specs/common/schemas/project-v0.0.1.json b/api/specs/common/schemas/project-v0.0.1.json deleted file mode 100644 index 8c178845ccb..00000000000 --- a/api/specs/common/schemas/project-v0.0.1.json +++ /dev/null @@ -1,768 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://simcore.io/api/specs/webserver/v0/components/schemas/project-v0.0.1.json", - "title": "simcore project", - "description": "Description of a simcore project", - "type": "object", - "additionalProperties": false, - "required": [ - "uuid", - "name", - "description", - "prjOwner", - "accessRights", - "creationDate", - "lastChangeDate", - "thumbnail", - "workbench" - ], - "properties": { - "uuid": { - "type": "string", - "format": "uuid", - "description": "project unique identifier", - "examples": [ - "07640335-a91f-468c-ab69-a374fa82078d", - "9bcf8feb-c1b1-41b6-b201-639cd6ccdba8" - ] - }, - "name": { - "type": "string", - "description": "project name", - "examples": [ - "Temporal Distortion Simulator" - ] - }, - "description": { - "type": "string", - "description": "longer one-line description about the project", - "examples": [ - "Dabbling in temporal transitions ..." - ] - }, - "prjOwner": { - "type": "string", - "format": "email", - "description": "user email" - }, - "accessRights": { - "type": "object", - "description": "object containing the GroupID as key and read/write/execution permissions as value", - "patternProperties": { - "^\\S+$": { - "type": "object", - "description": "the group id", - "additionalProperties": false, - "required": [ - "read", - "write", - "delete" - ], - "properties": { - "read": { - "type": "boolean", - "description": "gives read access" - }, - "write": { - "type": "boolean", - "description": "gives write access" - }, - "delete": { - "type": "boolean", - "description": "gives deletion rights" - } - } - } - } - }, - "creationDate": { - "type": "string", - "description": "project creation date", - "pattern": "\\d{4}-(12|11|10|0?[1-9])-(31|30|[0-2]?\\d)T(2[0-3]|1\\d|0?[0-9])(:(\\d|[0-5]\\d)){2}(\\.\\d{3})?Z", - "examples": [ - "2018-07-01T11:13:43Z" - ] - }, - "lastChangeDate": { - "type": "string", - "description": "last save date", - "pattern": "\\d{4}-(12|11|10|0?[1-9])-(31|30|[0-2]?\\d)T(2[0-3]|1\\d|0?[0-9])(:(\\d|[0-5]\\d)){2}(\\.\\d{3})?Z", - "examples": [ - "2018-07-01T11:13:43Z" - ] - }, - "thumbnail": { - "type": "string", - "minLength": 0, - "maxLength": 2083, - "format": "uri", - "description": "url of the latest screenshot of the project", - "examples": [ - "https://placeimg.com/171/96/tech/grayscale/?0.jpg" - ] - }, - "workbench": { - "type": "object", - "patternProperties": { - "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?4[0-9a-fA-F]{3}-?[89abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$": { - "type": "object", - "additionalProperties": false, - "required": [ - "key", - "version", - "label" - ], - "properties": { - "key": { - "type": "string", - "description": "distinctive name for the node based on the docker registry path", - "pattern": "^(simcore)/(services)/(comp|dynamic|frontend)(/[\\w/-]+)+$", - "examples": [ - "simcore/services/comp/sleeper", - "simcore/services/dynamic/3dviewer", - "simcore/services/frontend/file-picker" - ] - }, - "version": { - "type": "string", - "description": "semantic version number of the node", - "pattern": "^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){2}(-(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*)(\\.(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*))*)?(\\+[-\\da-zA-Z]+(\\.[-\\da-zA-Z-]+)*)?$", - "examples": [ - "1.0.0", - "0.0.1" - ] - }, - "label": { - "type": "string", - "description": "The short name of the node", - "example": [ - "JupyterLab" - ] - }, - "progress": { - "type": "number", - "maximum": 100, - "minimum": 0, - "description": "the node progress value" - }, - "thumbnail": { - "minLength": 0, - "maxLength": 2083, - "format": "uri", - "type": "string", - "description": "url of the latest screenshot of the node", - "examples": [ - "https://placeimg.com/171/96/tech/grayscale/?0.jpg" - ] - }, - "runHash": { - "description": "the hex digest of the resolved inputs +outputs hash at the time when the last outputs were generated", - "type": [ - "string", - "null" - ], - "examples": [ - "a4337bc45a8fc544c03f52dc550cd6e1e87021bc896588bd79e901e2" - ] - }, - "inputs": { - "type": "object", - "description": "values of input properties", - "patternProperties": { - "^[-_a-zA-Z0-9]+$": { - "oneOf": [ - { - "type": [ - "integer", - "boolean", - "string", - "number", - "null" - ] - }, - { - "type": "object", - "additionalProperties": false, - "required": [ - "nodeUuid", - "output" - ], - "properties": { - "nodeUuid": { - "type": "string", - "format": "uuid" - }, - "output": { - "type": "string", - "pattern": "^[-_a-zA-Z0-9]+$" - } - } - }, - { - "type": "object", - "additionalProperties": false, - "required": [ - "store", - "path" - ], - "properties": { - "store": { - "type": [ - "string", - "integer" - ] - }, - "dataset": { - "type": "string" - }, - "path": { - "type": "string" - }, - "label": { - "type": "string" - }, - "eTag": { - "type": "string" - } - } - }, - { - "type": "object", - "additionalProperties": false, - "required": [ - "downloadLink" - ], - "properties": { - "downloadLink": { - "minLength": 1, - "maxLength": 65536, - "type": "string", - "format": "uri" - }, - "label": { - "type": "string" - } - } - }, - { - "type": "array", - "items": {} - } - ] - } - } - }, - "inputsUnits": { - "type": "object", - "description": "values of input unit", - "patternProperties": { - "^[-_a-zA-Z0-9]+$": { - "type": "string", - "examples": [ - "kilo-meter", - "milli-second", - "micro-gram", - "kelvin" - ] - } - } - }, - "inputAccess": { - "description": "map with key - access level pairs", - "type": "object", - "patternProperties": { - "^[-_a-zA-Z0-9]+$": { - "type": "string", - "enum": [ - "Invisible", - "ReadOnly", - "ReadAndWrite" - ], - "default": "ReadAndWrite", - "examples": [ - "ReadOnly" - ] - } - } - }, - "inputNodes": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "description": "node IDs of where the node is connected to", - "examples": [ - "nodeUuid1", - "nodeUuid2" - ] - }, - "outputs": { - "default": {}, - "type": "object", - "patternProperties": { - "^[-_a-zA-Z0-9]+$": { - "oneOf": [ - { - "type": [ - "integer", - "boolean", - "string", - "number", - "null" - ] - }, - { - "type": "object", - "additionalProperties": false, - "required": [ - "store", - "path" - ], - "properties": { - "store": { - "type": [ - "string", - "integer" - ] - }, - "dataset": { - "type": "string" - }, - "path": { - "type": "string" - }, - "label": { - "type": "string" - }, - "eTag": { - "type": "string" - } - } - }, - { - "type": "object", - "additionalProperties": false, - "required": [ - "downloadLink" - ], - "properties": { - "downloadLink": { - "minLength": 1, - "maxLength": 65536, - "type": "string", - "format": "uri" - }, - "label": { - "type": "string" - } - } - }, - { - "type": "array", - "items": {} - } - ] - } - } - }, - "outputNode": { - "type": "boolean", - "deprecated": true - }, - "outputNodes": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "description": "Used in group-nodes. Node IDs of those connected to the output", - "examples": [ - "nodeUuid1", - "nodeUuid2" - ] - }, - "parent": { - "type": [ - "null", - "string" - ], - "format": "uuid", - "description": "Parent's (group-nodes') node ID s.", - "examples": [ - "nodeUuid1", - "nodeUuid2" - ] - }, - "position": { - "type": "object", - "additionalProperties": false, - "required": [ - "x", - "y" - ], - "properties": { - "x": { - "type": "integer", - "description": "The x position", - "example": [ - "12" - ] - }, - "y": { - "type": "integer", - "description": "The y position", - "example": [ - "15" - ] - } - }, - "deprecated": true - }, - "state": { - "title": "NodeState", - "type": "object", - "properties": { - "modified": { - "title": "Modified", - "description": "true if the node's outputs need to be re-computed", - "default": true, - "type": "boolean" - }, - "dependencies": { - "title": "Dependencies", - "description": "contains the node inputs dependencies if they need to be computed first", - "type": "array", - "uniqueItems": true, - "items": { - "type": "string", - "format": "uuid" - } - }, - "currentStatus": { - "description": "the node's current state", - "default": "NOT_STARTED", - "examples": [ - "RUNNING", - "FAILED" - ], - "enum": [ - "UNKNOWN", - "PUBLISHED", - "NOT_STARTED", - "PENDING", - "STARTED", - "RETRY", - "SUCCESS", - "FAILED", - "ABORTED" - ], - "type": "string" - } - }, - "additionalProperties": false - }, - "bootOptions": { - "title": "Boot Options", - "description": "Some services provide alternative parameters to be injected at boot time. The user selection should be stored here, and it will overwrite the services's defaults.", - "type": "object", - "patternProperties": { - "[a-zA-Z][a-azA-Z0-9_]*": { - "type": "string" - } - } - } - } - } - } - }, - "ui": { - "type": "object", - "additionalProperties": true, - "properties": { - "workbench": { - "type": "object", - "patternProperties": { - "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?4[0-9a-fA-F]{3}-?[89abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$": { - "type": "object", - "additionalProperties": false, - "required": [ - "position" - ], - "properties": { - "position": { - "type": "object", - "additionalProperties": false, - "required": [ - "x", - "y" - ], - "properties": { - "x": { - "type": "integer", - "description": "The x position", - "example": [ - "12" - ] - }, - "y": { - "type": "integer", - "description": "The y position", - "example": [ - "15" - ] - } - } - }, - "marker": { - "type": "object", - "additionalProperties": false, - "required": [ - "color" - ], - "properties": { - "color": { - "type": "string", - "description": "Marker's color", - "examples": [ - "#FF0000", - "#0000FF" - ] - } - } - } - } - } - } - }, - "slideshow": { - "type": "object", - "patternProperties": { - "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?4[0-9a-fA-F]{3}-?[89abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$": { - "type": "object", - "additionalProperties": false, - "required": [ - "position" - ], - "properties": { - "position": { - "type": "integer", - "description": "Slide's position", - "examples": [ - 0, - 2 - ] - }, - "instructions": { - "type": [ - "string", - "null" - ], - "description": "Instructions about what to do in this step", - "examples": [ - "This is a **sleeper**", - "Please, select the config file defined [in this link](asdf)" - ] - } - } - } - } - }, - "currentNodeId": { - "type": "string", - "format": "uuid" - }, - "annotations": { - "type": "object", - "patternProperties": { - "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?4[0-9a-fA-F]{3}-?[89abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$": { - "type": "object", - "additionalProperties": false, - "required": [ - "type", - "color", - "attributes" - ], - "properties": { - "type": { - "type": "string", - "description": "Annotation type", - "examples": [ - "rect", - "text" - ] - }, - "color": { - "type": "string", - "description": "Annotation's color", - "examples": [ - "#FF0000", - "#0000FF" - ] - }, - "attributes": { - "type": "object", - "description": "svg attributes" - } - } - } - } - } - } - }, - "tags": { - "type": "array", - "items": { - "type": "integer" - } - }, - "classifiers": { - "type": "array", - "description": "Contains the reference to the project classifiers", - "examples": [ - "some:id:to:a:classifier" - ], - "items": { - "type": "string" - } - }, - "dev": { - "type": "object", - "description": "object used for development purposes only" - }, - "state": { - "title": "State", - "description": "Project state", - "anyOf": [ - { - "type": "null" - }, - { - "title": "ProjectState", - "type": "object", - "additionalProperties": false, - "properties": { - "locked": { - "title": "Locked", - "description": "The project lock state", - "allOf": [ - { - "title": "ProjectLocked", - "type": "object", - "additionalProperties": false, - "properties": { - "value": { - "title": "Value", - "description": "True if the project is locked", - "type": "boolean" - }, - "owner": { - "title": "Owner", - "description": "If locked, the user that owns the lock", - "allOf": [ - { - "title": "Owner", - "type": "object", - "additionalProperties": false, - "properties": { - "user_id": { - "title": "User Id", - "type": "integer", - "description": "Owner's identifier when registered in the user's database table", - "example": [ - 2 - ] - }, - "first_name": { - "title": "First Name", - "description": "Owner first name", - "example": [ - "John" - ], - "type": "string" - }, - "last_name": { - "title": "Last Name", - "description": "Owner last name", - "example": [ - "Smith" - ], - "type": "string" - } - }, - "required": [ - "user_id", - "first_name", - "last_name" - ] - } - ] - }, - "status": { - "title": "Status", - "description": "The status of the project", - "enum": [ - "CLOSED", - "CLOSING", - "CLONING", - "OPENING", - "EXPORTING", - "OPENED" - ], - "type": "string" - } - }, - "required": [ - "value", - "status" - ] - } - ] - }, - "state": { - "title": "State", - "description": "The project running state", - "allOf": [ - { - "title": "ProjectRunningState", - "type": "object", - "additionalProperties": false, - "properties": { - "value": { - "title": "RunningState", - "description": "An enumeration.", - "enum": [ - "UNKNOWN", - "NOT_STARTED", - "PUBLISHED", - "PENDING", - "STARTED", - "RETRY", - "SUCCESS", - "FAILED", - "ABORTED" - ], - "type": "string" - } - }, - "required": [ - "value" - ] - } - ] - } - }, - "required": [ - "locked", - "state" - ] - } - ] - }, - "quality": { - "type": "object", - "title": "Quality", - "description": "Object containing Quality Assessment related data" - } - } -} diff --git a/api/specs/common/schemas/project.yaml b/api/specs/common/schemas/project.yaml index 1e9e31a52d6..3e29050d776 100644 --- a/api/specs/common/schemas/project.yaml +++ b/api/specs/common/schemas/project.yaml @@ -1,11 +1,11 @@ components: schemas: ProjectIn: - $ref: "./project-v0.0.1-converted.yaml" + $ref: "./project-v0.0.1-pydantic-converted-clean.yaml" ProjectOut: allOf: - - $ref: "./project-v0.0.1-converted.yaml" + - $ref: "./project-v0.0.1-pydantic-converted-clean.yaml" - type: object properties: state: diff --git a/api/specs/common/schemas/scripts/remove_definitions.py b/api/specs/common/schemas/scripts/remove_definitions.py new file mode 100644 index 00000000000..993995c2ce8 --- /dev/null +++ b/api/specs/common/schemas/scripts/remove_definitions.py @@ -0,0 +1,17 @@ +import os +import sys +import yaml + +DIR_PATH = os.path.dirname(os.path.realpath(__file__)) +source_file_name = sys.argv[1] +target_file_name = sys.argv[2] +file_source_path = DIR_PATH + f"/../{source_file_name}" +file_target_path = DIR_PATH + f"/../{target_file_name}" + +with open(file_source_path, "r") as stream: + try: + data = yaml.safe_load(stream) + data.pop("definitions", None) + yaml.dump(data, open(file_target_path, "w")) + except yaml.YAMLError as exc: + print(exc) diff --git a/api/specs/common/schemas/services.yaml b/api/specs/common/schemas/services.yaml index 803ad83294e..089f208a027 100644 --- a/api/specs/common/schemas/services.yaml +++ b/api/specs/common/schemas/services.yaml @@ -8,7 +8,7 @@ components: data: type: array items: - $ref: "./node-meta-v0.0.1-converted.yaml" + $ref: "./node-meta-v0.0.1-pydantic-converted-clean.yaml" error: nullable: true default: null diff --git a/api/specs/webserver/scripts/openapi_node_meta.py b/api/specs/webserver/scripts/openapi_node_meta.py new file mode 100644 index 00000000000..1caece817b4 --- /dev/null +++ b/api/specs/webserver/scripts/openapi_node_meta.py @@ -0,0 +1,44 @@ +""" Helper script to automatically generate OAS + +This OAS are the source of truth +""" + +# pylint: disable=redefined-outer-name +# pylint: disable=unused-argument +# pylint: disable=unused-variable +# pylint: disable=too-many-arguments + + +import json + +import jsonref +from fastapi import FastAPI +from models_library.services import ServiceDockerData + +app = FastAPI(redoc_url=None, openapi_version="3.0.0") + + +@app.get( + "", +) +async def get_project_inputs(project: ServiceDockerData): + """New in version *0.10*""" + + +if __name__ == "__main__": + from _common import CURRENT_DIR + + # Generate OAS for the Project pydantic model via the FastAPI app + # NOTE: currently not used, as the generated OAS does not generate x-pattern properties + # it has problem with types ex. ServiceInputsDict = dict[ServicePortKey, ServiceInput], where key is a constrained string + # create_openapi_specs( + # app, CURRENT_DIR.parent / "../common/schemas/openapi-node-meta-generated.yaml" + # ) + # Generate dereferenced json schema from the ServiceDockerData pydantic model and save it + with open( + CURRENT_DIR.parent / "../common/schemas/node-meta-v0.0.1-pydantic.json", "w" + ) as f: + schema = ServiceDockerData.schema_json() + schema_without_ref = jsonref.loads(schema) + + json.dump(schema_without_ref, f, indent=2) diff --git a/api/specs/webserver/scripts/openapi_project.py b/api/specs/webserver/scripts/openapi_project.py new file mode 100644 index 00000000000..74d7a2c5ee3 --- /dev/null +++ b/api/specs/webserver/scripts/openapi_project.py @@ -0,0 +1,43 @@ +""" Helper script to automatically generate OAS + +This OAS are the source of truth +""" + +# pylint: disable=redefined-outer-name +# pylint: disable=unused-argument +# pylint: disable=unused-variable +# pylint: disable=too-many-arguments + +import json + +import jsonref +from fastapi import FastAPI +from models_library.projects import Project + +app = FastAPI(redoc_url=None, openapi_version="3.0.0") + + +@app.get( + "", +) +async def get_project_inputs(project: Project): + """New in version *0.10*""" + + +if __name__ == "__main__": + from _common import CURRENT_DIR + + # Generate OAS for the Project pydantic model via the FastAPI app + # NOTE: currently not used, as the generated OAS does not generate x-pattern properties + # it has problem with types ex. Workbench = dict[NodeIDstr, Node], where key is a constrained string + # create_openapi_specs( + # app, CURRENT_DIR.parent / "../common/schemas/openapi-project-generated.yaml" + # ) + # Generate dereferenced json schema from the Project pydantic model and save it + with open( + CURRENT_DIR.parent / "../common/schemas/project-v0.0.1-pydantic.json", "w" + ) as f: + schema = Project.schema_json() + schema_without_ref = jsonref.loads(schema) + + json.dump(schema_without_ref, f, indent=2) diff --git a/api/specs/webserver/scripts/requirements.txt b/api/specs/webserver/scripts/requirements.txt index 30c49abedff..da8883a7c95 100644 --- a/api/specs/webserver/scripts/requirements.txt +++ b/api/specs/webserver/scripts/requirements.txt @@ -1,3 +1,4 @@ # Extra reqs, besides webserver's fastapi +jsonref diff --git a/api/tests/test_repo_data.py b/api/tests/test_repo_data.py index 3ce4e911fe3..03d9245ec55 100644 --- a/api/tests/test_repo_data.py +++ b/api/tests/test_repo_data.py @@ -15,7 +15,7 @@ SYNCED_VERSIONS_SUFFIX = [ ".json", # json-schema specs file - "-converted.yaml", # equivalent openapi specs file (see scripts/json-schema-to-openapi-schema) + "-converted-clean.yaml", # equivalent openapi specs file (see scripts/json-schema-to-openapi-schema) ] # Add here paths to files containing project's data that can be validated with projects schema diff --git a/packages/models-library/src/models_library/projects.py b/packages/models-library/src/models_library/projects.py index f4a02fa1683..58077b5f127 100644 --- a/packages/models-library/src/models_library/projects.py +++ b/packages/models-library/src/models_library/projects.py @@ -7,12 +7,12 @@ from typing import Any, Optional from uuid import UUID -from pydantic import BaseModel, Extra, Field, HttpUrl, constr, validator +from pydantic import BaseModel, Extra, Field, constr, validator from .basic_regex import DATE_RE, UUID_RE_BASE from .emails import LowerCaseEmailStr from .projects_access import AccessRights, GroupIDStr -from .projects_nodes import Node +from .projects_nodes import HttpUrlWithCustomMinLength, Node from .projects_nodes_io import NodeIDStr from .projects_state import ProjectState from .projects_ui import StudyUI @@ -55,7 +55,7 @@ class BaseProjectModel(BaseModel): description="longer one-line description about the project", examples=["Dabbling in temporal transitions ..."], ) - thumbnail: Optional[HttpUrl] = Field( + thumbnail: Optional[HttpUrlWithCustomMinLength] = Field( ..., description="url of the project thumbnail", examples=["https://placeimg.com/171/96/tech/grayscale/?0.jpg"], diff --git a/packages/models-library/src/models_library/projects_access.py b/packages/models-library/src/models_library/projects_access.py index b7fe3593f60..ad17cd523fe 100644 --- a/packages/models-library/src/models_library/projects_access.py +++ b/packages/models-library/src/models_library/projects_access.py @@ -25,8 +25,16 @@ class Config: extra = Extra.forbid +class PositiveIntWithExclusiveMinimumRemoved(PositiveInt): + # As we are trying to match this Pydantic model to a historical json schema "project-v0.0.1" we need to remove this + # Pydantic does not support exclusiveMinimum boolean https://github.com/pydantic/pydantic/issues/4108 + @classmethod + def __modify_schema__(cls, field_schema): + field_schema.pop("exclusiveMinimum", None) + + class Owner(BaseModel): - user_id: PositiveInt = Field( + user_id: PositiveIntWithExclusiveMinimumRemoved = Field( ..., description="Owner's identifier when registered in the user's database table", examples=[2], diff --git a/packages/models-library/src/models_library/projects_nodes.py b/packages/models-library/src/models_library/projects_nodes.py index 8d3c11c1b48..5b293c210ea 100644 --- a/packages/models-library/src/models_library/projects_nodes.py +++ b/packages/models-library/src/models_library/projects_nodes.py @@ -98,6 +98,11 @@ class Config: } +class HttpUrlWithCustomMinLength(HttpUrl): + # Overwriting min length to be back compatible when generating OAS + min_length = 0 + + class Node(BaseModel): key: ServiceKey = Field( ..., @@ -119,7 +124,7 @@ class Node(BaseModel): progress: Optional[float] = Field( default=None, ge=0, le=100, description="the node progress value" ) - thumbnail: Optional[HttpUrl] = Field( + thumbnail: Optional[HttpUrlWithCustomMinLength] = Field( default=None, description="url of the latest screenshot of the node", examples=["https://placeimg.com/171/96/tech/grayscale/?0.jpg"], diff --git a/packages/models-library/src/models_library/projects_nodes_io.py b/packages/models-library/src/models_library/projects_nodes_io.py index d10aadd786b..1ed5e9ad684 100644 --- a/packages/models-library/src/models_library/projects_nodes_io.py +++ b/packages/models-library/src/models_library/projects_nodes_io.py @@ -146,14 +146,13 @@ def pre_fill_label_with_filename_ext(cls, v, values): class Config: extra = Extra.forbid schema_extra = { - # a project file - "example": { - "store": 0, - "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt", - "eTag": "859fda0cb82fc4acb4686510a172d9a9-1", - "label": "input.txt", - }, "examples": [ + { + "store": 0, + "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt", + "eTag": "859fda0cb82fc4acb4686510a172d9a9-1", + "label": "input.txt", + }, # legacy: store as string (SEE incident https://git.speag.com/oSparc/e2e-testing/-/issues/1) { "store": "0", @@ -199,14 +198,14 @@ def check_discriminator(cls, v): class Config: extra = Extra.forbid schema_extra = { - "example": { - # minimal - "store": 1, - "dataset": "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4", - "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", - "label": "initial_WTstates", - }, "examples": [ + { + # minimal + "store": 1, + "dataset": "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4", + "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", + "label": "initial_WTstates", + }, # with store id as str { "store": 1, diff --git a/packages/models-library/src/models_library/services_ui.py b/packages/models-library/src/models_library/services_ui.py index 18dbd0b7469..2933c09a212 100644 --- a/packages/models-library/src/models_library/services_ui.py +++ b/packages/models-library/src/models_library/services_ui.py @@ -1,5 +1,5 @@ from enum import Enum -from typing import List, Union +from typing import Union from pydantic import BaseModel, Extra, Field from pydantic.types import PositiveInt @@ -28,7 +28,7 @@ class Config: class SelectBox(BaseModel): - structure: List[Structure] = Field(..., min_items=1) + structure: list[Structure] = Field(..., min_items=1) class Config: extra = Extra.forbid diff --git a/packages/models-library/tests/test__models_fit_schemas.py b/packages/models-library/tests/test__models_fit_schemas.py index aed9f354b34..bbf9f0adfe7 100644 --- a/packages/models-library/tests/test__models_fit_schemas.py +++ b/packages/models-library/tests/test__models_fit_schemas.py @@ -13,7 +13,7 @@ @pytest.mark.parametrize( "pydantic_model, original_json_schema", - [(ServiceDockerData, "node-meta-v0.0.1.json"), (Project, "project-v0.0.1.json")], + [(ServiceDockerData, "node-meta-v0.0.1-pydantic.json"), (Project, "project-v0.0.1-pydantic.json")], ) def test_generated_schema_same_as_original( pydantic_model: BaseModel, diff --git a/packages/models-library/tests/test__pydantic_models.py b/packages/models-library/tests/test__pydantic_models.py index 5399a05fd09..38e47bf3c76 100644 --- a/packages/models-library/tests/test__pydantic_models.py +++ b/packages/models-library/tests/test__pydantic_models.py @@ -6,7 +6,7 @@ """ -from typing import List, Union, get_args, get_origin +from typing import Union, get_args, get_origin import pytest from models_library.projects_nodes import InputTypes, OutputTypes @@ -36,7 +36,7 @@ class ArgumentAnnotation(BaseModel): data_schema: Json # notice that this is a raw string! - jsonschema_of_x = schema_json_of(List[int], title="schema[x]") + jsonschema_of_x = schema_json_of(list[int], title="schema[x]") assert isinstance(jsonschema_of_x, str) x_annotation = ArgumentAnnotation(name="x", data_schema=jsonschema_of_x) @@ -138,7 +138,7 @@ class Func(BaseModel): assert model.output == "some/path/or/string" # (undefined) json string vs SimCoreFileLink.dict() ------------ - MINIMAL = 1 + MINIMAL = 2 # <--- index of the example with the minimum required fields assert SimCoreFileLink in get_args(OutputTypes) example = SimCoreFileLink.parse_obj( SimCoreFileLink.Config.schema_extra["examples"][MINIMAL] diff --git a/packages/models-library/tests/test_services.py b/packages/models-library/tests/test_services.py index 7cba14f9725..1143ad343cf 100644 --- a/packages/models-library/tests/test_services.py +++ b/packages/models-library/tests/test_services.py @@ -5,7 +5,7 @@ import re from copy import deepcopy from pprint import pformat -from typing import Any, Callable, Dict, List +from typing import Any, Callable import pytest from models_library.basic_regex import VERSION_RE @@ -24,7 +24,7 @@ @pytest.fixture() -def minimal_service_common_data() -> Dict[str, Any]: +def minimal_service_common_data() -> dict[str, Any]: return dict( name="this is a nice sample service", description="this is the description of the service", @@ -32,7 +32,7 @@ def minimal_service_common_data() -> Dict[str, Any]: def test_create_minimal_service_common_data( - minimal_service_common_data: Dict[str, Any] + minimal_service_common_data: dict[str, Any] ): service = _BaseServiceCommonDataModel(**minimal_service_common_data) @@ -41,7 +41,7 @@ def test_create_minimal_service_common_data( assert service.thumbnail == None -def test_node_with_empty_thumbnail(minimal_service_common_data: Dict[str, Any]): +def test_node_with_empty_thumbnail(minimal_service_common_data: dict[str, Any]): service_data = minimal_service_common_data service_data.update({"thumbnail": ""}) @@ -52,7 +52,7 @@ def test_node_with_empty_thumbnail(minimal_service_common_data: Dict[str, Any]): assert service.thumbnail == None -def test_node_with_thumbnail(minimal_service_common_data: Dict[str, Any]): +def test_node_with_thumbnail(minimal_service_common_data: dict[str, Any]): service_data = minimal_service_common_data service_data.update( { @@ -182,22 +182,22 @@ def test_services_model_examples(model_cls, model_cls_examples): @pytest.mark.parametrize( "python_regex_pattern, json_schema_file_name, json_schema_entry_paths", [ - (SERVICE_KEY_RE, "project-v0.0.1.json", ["key"]), - (VERSION_RE, "project-v0.0.1.json", ["version"]), - (VERSION_RE, "node-meta-v0.0.1.json", ["version"]), - (SERVICE_KEY_RE, "node-meta-v0.0.1.json", ["key"]), + (SERVICE_KEY_RE, "project-v0.0.1-pydantic.json", ["key"]), + (VERSION_RE, "project-v0.0.1-pydantic.json", ["version"]), + (VERSION_RE, "node-meta-v0.0.1-pydantic.json", ["version"]), + (SERVICE_KEY_RE, "node-meta-v0.0.1-pydantic.json", ["key"]), ], ) def test_same_regex_patterns_in_jsonschema_and_python( python_regex_pattern: str, json_schema_file_name: str, - json_schema_entry_paths: List[str], + json_schema_entry_paths: list[str], json_schema_dict: Callable, ): # read file in json_schema_config = json_schema_dict(json_schema_file_name) # go to keys - def _find_pattern_entry(obj: Dict[str, Any], key: str) -> Any: + def _find_pattern_entry(obj: dict[str, Any], key: str) -> Any: if key in obj: return obj[key]["pattern"] for v in obj.values(): diff --git a/packages/pytest-simcore/src/pytest_simcore/schemas.py b/packages/pytest-simcore/src/pytest_simcore/schemas.py index 8bdfecb9af8..743f88d2b00 100644 --- a/packages/pytest-simcore/src/pytest_simcore/schemas.py +++ b/packages/pytest-simcore/src/pytest_simcore/schemas.py @@ -20,7 +20,7 @@ def common_schemas_specs_dir(osparc_simcore_root_dir: Path) -> Path: @pytest.fixture(scope="session") def node_meta_schema_file(common_schemas_specs_dir: Path) -> Path: - node_meta_file = common_schemas_specs_dir / "node-meta-v0.0.1.json" + node_meta_file = common_schemas_specs_dir / "node-meta-v0.0.1-pydantic.json" assert node_meta_file.exists() return node_meta_file @@ -106,6 +106,11 @@ def _run_diff(schema_lhs: dict, schema_rhs: dict) -> subprocess.CompletedProcess schema_rhs_path = tmpdir / "schema_rhs.json" schema_rhs_path.write_text(json.dumps(schema_rhs, indent=1)) + # NOTE: When debugging the differences, as of now both schemas come from + # pydantic model, now it is possible to visually compare the difference. To do so, + # just dereference the current pydantic schema. Example can be seen here: + # /osparc-simcore/api/specs/webserver/scripts/openapi_project.py + return subprocess.run( [json_diff_script, schema_lhs_path, schema_rhs_path], stdout=subprocess.PIPE, diff --git a/services/director-v2/src/simcore_service_director_v2/core/settings.py b/services/director-v2/src/simcore_service_director_v2/core/settings.py index 9b1e1e72b71..9b4c5af21a2 100644 --- a/services/director-v2/src/simcore_service_director_v2/core/settings.py +++ b/services/director-v2/src/simcore_service_director_v2/core/settings.py @@ -520,7 +520,7 @@ class AppSettings(BaseCustomSettings, MixinLoggingSettings): SWARM_STACK_NAME: str = Field("undefined-please-check", env="SWARM_STACK_NAME") NODE_SCHEMA_LOCATION: str = Field( - f"{API_ROOT}/{API_VTAG}/schemas/node-meta-v0.0.1.json", + f"{API_ROOT}/{API_VTAG}/schemas/node-meta-v0.0.1-pydantic.json", description="used when in devel mode vs release mode", ) diff --git a/services/storage/src/simcore_service_storage/api/v0/openapi.yaml b/services/storage/src/simcore_service_storage/api/v0/openapi.yaml index 1fc0360136a..6eb6bec08af 100644 --- a/services/storage/src/simcore_service_storage/api/v0/openapi.yaml +++ b/services/storage/src/simcore_service_storage/api/v0/openapi.yaml @@ -1158,550 +1158,770 @@ components: endpoint: type: string Project: - title: simcore project - description: Description of a simcore project - type: object additionalProperties: false - required: - - uuid - - name - - description - - prjOwner - - accessRights - - creationDate - - lastChangeDate - - thumbnail - - workbench properties: - uuid: - type: string - format: uuid - description: project unique identifier - example: 07640335-a91f-468c-ab69-a374fa82078d - name: - type: string - description: project name - example: Temporal Distortion Simulator - description: - type: string - description: longer one-line description about the project - example: Dabbling in temporal transitions ... - prjOwner: - type: string - format: email - description: user email accessRights: - type: object + additionalProperties: true description: object containing the GroupID as key and read/write/execution permissions as value + title: Accessrights + type: object x-patternProperties: ^\S+$: - type: object - description: the group id additionalProperties: false - required: - - read - - write - - delete properties: - read: + delete: + description: gives deletion rights + title: Delete type: boolean + read: description: gives read access - write: + title: Read type: boolean + write: description: gives write access - delete: + title: Write type: boolean - description: gives deletion rights - additionalProperties: true + required: + - read + - write + - delete + title: AccessRights + type: object + classifiers: + description: Contains the reference to the project classifiers + example: 'some:id:to:a:classifier' + items: + type: string + title: Classifiers + type: array creationDate: - type: string description: project creation date - pattern: '\d{4}-(12|11|10|0?[1-9])-(31|30|[0-2]?\d)T(2[0-3]|1\d|0?[0-9])(:(\d|[0-5]\d)){2}(\.\d{3})?Z' example: '2018-07-01T11:13:43Z' - lastChangeDate: + pattern: '\d{4}-(12|11|10|0?[1-9])-(31|30|[0-2]?\d)T(2[0-3]|1\d|0?[0-9])(:(\d|[0-5]\d)){2}(\.\d{3})?Z' + title: Creationdate + type: string + description: + description: longer one-line description about the project + example: Dabbling in temporal transitions ... + title: Description type: string + dev: + description: object used for development purposes only + title: Dev + type: object + lastChangeDate: description: last save date - pattern: '\d{4}-(12|11|10|0?[1-9])-(31|30|[0-2]?\d)T(2[0-3]|1\d|0?[0-9])(:(\d|[0-5]\d)){2}(\.\d{3})?Z' example: '2018-07-01T11:13:43Z' - thumbnail: + pattern: '\d{4}-(12|11|10|0?[1-9])-(31|30|[0-2]?\d)T(2[0-3]|1\d|0?[0-9])(:(\d|[0-5]\d)){2}(\.\d{3})?Z' + title: Lastchangedate type: string - minLength: 0 - maxLength: 2083 - format: uri - description: url of the latest screenshot of the project + name: + description: project name + example: Temporal Distortion Simulator + title: Name + type: string + prjOwner: + description: user email + format: email + title: Prjowner + type: string + quality: + default: {} + description: stores the study quality assessment + title: Quality + type: object + state: + anyOf: + - nullable: true + - additionalProperties: false + properties: + locked: + allOf: + - additionalProperties: false + example: + status: CLOSED + value: false + properties: + owner: + allOf: + - additionalProperties: false + properties: + first_name: + description: Owner first name + example: John + title: First Name + type: string + last_name: + description: Owner last name + example: Smith + title: Last Name + type: string + user_id: + description: Owner's identifier when registered in the user's database table + example: 2 + title: User Id + type: integer + required: + - user_id + - first_name + - last_name + title: Owner + type: object + description: 'If locked, the user that owns the lock' + title: Owner + status: + allOf: + - description: An enumeration. + enum: + - CLOSED + - CLOSING + - CLONING + - EXPORTING + - OPENING + - OPENED + title: ProjectStatus + type: string + description: The status of the project + value: + description: True if the project is locked + title: Value + type: boolean + required: + - value + - status + title: ProjectLocked + type: object + description: The project lock state + title: Locked + state: + allOf: + - additionalProperties: false + properties: + value: + allOf: + - description: |- + State of execution of a project's computational workflow + + SEE StateType for task state + enum: + - UNKNOWN + - PUBLISHED + - NOT_STARTED + - PENDING + - STARTED + - RETRY + - SUCCESS + - FAILED + - ABORTED + title: RunningState + type: string + description: The running state of the project + example: STARTED + required: + - value + title: ProjectRunningState + type: object + description: The project running state + title: State + required: + - locked + - state + title: ProjectState + type: object + tags: + default: [] + items: + type: integer + title: Tags + type: array + thumbnail: + description: url of the project thumbnail example: 'https://placeimg.com/171/96/tech/grayscale/?0.jpg' + format: uri + maxLength: 2083 + minLength: 0 + title: Thumbnail + type: string + ui: + properties: + annotations: + additionalProperties: true + title: Annotations + type: object + x-patternProperties: + '^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$': + additionalProperties: false + example: + - attributes: + height: 26 + width: 117 + x: 415 + 'y': 100 + color: '#FF0000' + type: rect + - attributes: + text: Hey! + x: 415 + 'y': 100 + color: '#0000FF' + type: text + properties: + attributes: + description: svg attributes + title: Attributes + type: object + color: + format: color + title: Color + type: string + type: + enum: + - rect + - text + title: Type + type: string + required: + - type + - color + - attributes + title: Annotation + type: object + currentNodeId: + format: uuid + title: Currentnodeid + type: string + slideshow: + additionalProperties: true + title: Slideshow + type: object + x-patternProperties: + '^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$': + properties: + instructions: + title: Instructions + type: string + position: + title: Position + type: integer + required: + - position + title: Slideshow + type: object + workbench: + additionalProperties: true + title: Workbench + type: object + x-patternProperties: + '^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$': + additionalProperties: false + properties: + marker: + additionalProperties: false + properties: + color: + format: color + title: Color + type: string + required: + - color + title: Marker + type: object + position: + allOf: + - additionalProperties: false + properties: + x: + description: The x position + example: + - '12' + title: X + type: integer + 'y': + description: The y position + example: + - '15' + title: 'Y' + type: integer + required: + - x + - 'y' + title: Position + type: object + description: The node position in the workbench + title: Position + required: + - position + title: WorkbenchUI + type: object + title: StudyUI + type: object + uuid: + description: project unique identifier + example: 07640335-a91f-468c-ab69-a374fa82078d + format: uuid + title: Uuid + type: string workbench: + additionalProperties: true + description: Project's pipeline + title: Workbench type: object x-patternProperties: - '^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?4[0-9a-fA-F]{3}-?[89abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$': - type: object + '^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$': additionalProperties: false - required: - - key - - version - - label properties: - key: - type: string - description: distinctive name for the node based on the docker registry path - pattern: '^(simcore)/(services)/(comp|dynamic|frontend)(/[\w/-]+)+$' - example: - - simcore/services/comp/sleeper - - simcore/services/dynamic/3dviewer - - simcore/services/frontend/file-picker - version: - type: string - description: semantic version number of the node - pattern: '^(0|[1-9]\d*)(\.(0|[1-9]\d*)){2}(-(0|[1-9]\d*|\d*[-a-zA-Z][-\da-zA-Z]*)(\.(0|[1-9]\d*|\d*[-a-zA-Z][-\da-zA-Z]*))*)?(\+[-\da-zA-Z]+(\.[-\da-zA-Z-]+)*)?$' - example: - - 1.0.0 - - 0.0.1 - label: - type: string - description: The short name of the node - example: - - JupyterLab - progress: - type: number - maximum: 100 - minimum: 0 - description: the node progress value - thumbnail: - minLength: 0 - maxLength: 2083 - format: uri - type: string - description: url of the latest screenshot of the node - example: - - 'https://placeimg.com/171/96/tech/grayscale/?0.jpg' - runHash: - description: the hex digest of the resolved inputs +outputs hash at the time when the last outputs were generated - type: - - string - - 'null' - example: - - a4337bc45a8fc544c03f52dc550cd6e1e87021bc896588bd79e901e2 - inputs: + bootOptions: + description: 'Some services provide alternative parameters to be injected at boot time. The user selection should be stored here, and it will overwrite the services''s defaults.' + patternProperties: + '[a-zA-Z][a-azA-Z0-9_]*': + type: string + title: Bootoptions type: object + inputAccess: + description: map with key - access level pairs + patternProperties: + '^[-_a-zA-Z0-9]+$': + description: An enumeration. + enum: + - ReadAndWrite + - Invisible + - ReadOnly + title: AccessEnum + type: string + type: object + inputNodes: + description: node IDs of where the node is connected to + items: + format: uuid + type: string + title: Inputnodes + type: array + inputs: description: values of input properties patternProperties: '^[-_a-zA-Z0-9]+$': - oneOf: - - type: - - integer - - boolean - - string - - number - - 'null' - - type: object - additionalProperties: false + anyOf: + - type: boolean + - type: integer + - type: number + - format: json-string + type: string + - type: string + - additionalProperties: false + description: I/O port type to reference to an output port of another node in the same project + example: + - nodeUuid: da5068e0-8a8d-4fb9-9516-56e5ddaef15b + output: out_2 + properties: + nodeUuid: + description: The node to get the port output from + format: uuid + title: Nodeuuid + type: string + output: + description: The port key in the node given by nodeUuid + pattern: '^[-_a-zA-Z0-9]+$' + title: Output + type: string required: - nodeUuid - output + title: PortLink + type: object + - additionalProperties: false + description: I/O port type to hold a link to a file in simcore S3 storage + example: + - eTag: 859fda0cb82fc4acb4686510a172d9a9-1 + label: input.txt + path: 94453a6a-c8d4-52b3-a22d-ccbf81f8d636/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt + store: 0 + - eTag: f7e4c7076761a42a871e978c8691c676 + path: 50339632-ee1d-11ec-a0c2-02420a0194e4/23b1522f-225f-5a4c-9158-c4c19a70d4a8/output.h5 + store: '0' + - path: api/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt + store: 0 + - path: 94453a6a-c8d4-52b3-a22d-ccbf81f8d636/d4442ca4-23fd-5b6b-ba6d-0b75f711c109/y_1D.txt + store: 0 properties: - nodeUuid: + dataset: + deprecated: true + title: Dataset type: string - format: uuid - output: + eTag: + description: Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box). + title: Etag type: string - pattern: '^[-_a-zA-Z0-9]+$' - - type: object - additionalProperties: false + label: + description: The real file name + title: Label + type: string + path: + anyOf: + - pattern: '^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\/(.+)$' + type: string + - pattern: '^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$' + type: string + description: The path to the file in the storage provider domain + title: Path + store: + description: 'The store identifier: 0 for simcore S3, 1 for datcore' + title: Store + type: integer required: - store - path + title: SimCoreFileLink + type: object + - additionalProperties: false + description: I/O port type to hold a link to a file in DATCORE storage + example: + - dataset: 'N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4' + label: initial_WTstates + path: 'N:package:32df09ba-e8d6-46da-bd54-f696157de6ce' + store: 1 + - dataset: 'N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4' + label: initial_WTstates + path: 'N:package:32df09ba-e8d6-46da-bd54-f696157de6ce' + store: 1 properties: - store: - type: - - string - - integer dataset: + description: Unique identifier to access the dataset on datcore (REQUIRED for datcore) + title: Dataset type: string - path: + eTag: + description: Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box). + title: Etag type: string label: + description: The real file name + title: Label type: string - eTag: - type: string - - type: object - additionalProperties: false + path: + anyOf: + - pattern: '^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\/(.+)$' + type: string + - pattern: '^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$' + type: string + description: The path to the file in the storage provider domain + title: Path + store: + description: 'The store identifier: 0 for simcore S3, 1 for datcore' + title: Store + type: integer required: - - downloadLink + - store + - path + - label + - dataset + title: DatCoreFileLink + type: object + - additionalProperties: false + description: 'I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)' + example: + - downloadLink: 'https://fakeimg.pl/250x100/' properties: downloadLink: - minLength: 1 + format: uri maxLength: 65536 + minLength: 1 + title: Downloadlink type: string - format: uri label: + title: Label type: string - - type: array - items: {} - inputsUnits: + required: + - downloadLink + title: DownloadLink + type: object + - items: {} + type: array + - type: object + title: Inputs type: object - description: values of input unit + inputsUnits: + description: Overrides default unit (if any) defined in the service for each port patternProperties: '^[-_a-zA-Z0-9]+$': type: string - example: - - kilo-meter - - milli-second - - micro-gram - - kelvin - inputAccess: - description: map with key - access level pairs + title: Inputsunits type: object - patternProperties: - '^[-_a-zA-Z0-9]+$': - type: string - enum: - - Invisible - - ReadOnly - - ReadAndWrite - default: ReadAndWrite - example: - - ReadOnly - inputNodes: - type: array + key: + description: distinctive name for the node based on the docker registry path + example: + - simcore/services/comp/itis/sleeper + - simcore/services/dynamic/3dviewer + - simcore/services/frontend/file-picker + pattern: '^(simcore)/(services)/(comp|dynamic|frontend)(/[\w/-]+)+$' + title: Key + type: string + label: + description: The short name of the node + example: + - JupyterLab + title: Label + type: string + outputNode: + deprecated: true + title: Outputnode + type: boolean + outputNodes: + description: Used in group-nodes. Node IDs of those connected to the output items: - type: string format: uuid - description: node IDs of where the node is connected to - example: - - nodeUuid1 - - nodeUuid2 + type: string + title: Outputnodes + type: array outputs: - default: {} - type: object + description: values of output properties patternProperties: '^[-_a-zA-Z0-9]+$': - oneOf: - - type: - - integer - - boolean - - string - - number - - 'null' - - type: object - additionalProperties: false + anyOf: + - type: boolean + - type: integer + - type: number + - format: json-string + type: string + - type: string + - additionalProperties: false + description: I/O port type to hold a link to a file in simcore S3 storage + example: + - eTag: 859fda0cb82fc4acb4686510a172d9a9-1 + label: input.txt + path: 94453a6a-c8d4-52b3-a22d-ccbf81f8d636/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt + store: 0 + - eTag: f7e4c7076761a42a871e978c8691c676 + path: 50339632-ee1d-11ec-a0c2-02420a0194e4/23b1522f-225f-5a4c-9158-c4c19a70d4a8/output.h5 + store: '0' + - path: api/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt + store: 0 + - path: 94453a6a-c8d4-52b3-a22d-ccbf81f8d636/d4442ca4-23fd-5b6b-ba6d-0b75f711c109/y_1D.txt + store: 0 + properties: + dataset: + deprecated: true + title: Dataset + type: string + eTag: + description: Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box). + title: Etag + type: string + label: + description: The real file name + title: Label + type: string + path: + anyOf: + - pattern: '^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\/(.+)$' + type: string + - pattern: '^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$' + type: string + description: The path to the file in the storage provider domain + title: Path + store: + description: 'The store identifier: 0 for simcore S3, 1 for datcore' + title: Store + type: integer required: - store - path + title: SimCoreFileLink + type: object + - additionalProperties: false + description: I/O port type to hold a link to a file in DATCORE storage + example: + - dataset: 'N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4' + label: initial_WTstates + path: 'N:package:32df09ba-e8d6-46da-bd54-f696157de6ce' + store: 1 + - dataset: 'N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4' + label: initial_WTstates + path: 'N:package:32df09ba-e8d6-46da-bd54-f696157de6ce' + store: 1 properties: - store: - type: - - string - - integer dataset: + description: Unique identifier to access the dataset on datcore (REQUIRED for datcore) + title: Dataset type: string - path: + eTag: + description: Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box). + title: Etag type: string label: + description: The real file name + title: Label type: string - eTag: - type: string - - type: object - additionalProperties: false + path: + anyOf: + - pattern: '^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\/(.+)$' + type: string + - pattern: '^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$' + type: string + description: The path to the file in the storage provider domain + title: Path + store: + description: 'The store identifier: 0 for simcore S3, 1 for datcore' + title: Store + type: integer required: - - downloadLink + - store + - path + - label + - dataset + title: DatCoreFileLink + type: object + - additionalProperties: false + description: 'I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)' + example: + - downloadLink: 'https://fakeimg.pl/250x100/' properties: downloadLink: - minLength: 1 + format: uri maxLength: 65536 + minLength: 1 + title: Downloadlink type: string - format: uri label: + title: Label type: string - - type: array - items: {} - outputNode: - type: boolean - deprecated: true - outputNodes: - type: array - items: - type: string - format: uuid - description: Used in group-nodes. Node IDs of those connected to the output - example: - - nodeUuid1 - - nodeUuid2 - parent: - type: - - 'null' - - string - format: uuid - description: Parent's (group-nodes') node ID s. - example: - - nodeUuid1 - - nodeUuid2 - position: - type: object - additionalProperties: false - required: - - x - - 'y' - properties: - x: - type: integer - description: The x position - example: - - '12' - 'y': - type: integer - description: The y position - example: - - '15' - deprecated: true - state: - title: NodeState - type: object - properties: - modified: - title: Modified - description: true if the node's outputs need to be re-computed - default: true - type: boolean - dependencies: - title: Dependencies - description: contains the node inputs dependencies if they need to be computed first - type: array - uniqueItems: true - items: - type: string - format: uuid - currentStatus: - description: the node's current state - default: NOT_STARTED - example: - - RUNNING - - FAILED - enum: - - UNKNOWN - - PUBLISHED - - NOT_STARTED - - PENDING - - STARTED - - RETRY - - SUCCESS - - FAILED - - ABORTED - type: string - additionalProperties: false - bootOptions: - title: Boot Options - description: 'Some services provide alternative parameters to be injected at boot time. The user selection should be stored here, and it will overwrite the services''s defaults.' + required: + - downloadLink + title: DownloadLink + type: object + - items: {} + type: array + - type: object + title: Outputs type: object - patternProperties: - '[a-zA-Z][a-azA-Z0-9_]*': + parent: + anyOf: + - type: 'null' + - description: Parent's (group-nodes') node ID s. Used to group + format: uuid + title: Parent type: string - additionalProperties: true - ui: - type: object - additionalProperties: true - properties: - workbench: - type: object - x-patternProperties: - '^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?4[0-9a-fA-F]{3}-?[89abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$': - type: object - additionalProperties: false - required: - - position - properties: - position: - type: object - additionalProperties: false - required: - - x - - 'y' + position: + allOf: + - additionalProperties: false properties: x: - type: integer description: The x position example: - '12' - 'y': + title: X type: integer + 'y': description: The y position example: - '15' - marker: - type: object - additionalProperties: false + title: 'Y' + type: integer required: - - color - properties: - color: - type: string - description: Marker's color - example: - - '#FF0000' - - '#0000FF' - additionalProperties: true - slideshow: - type: object - x-patternProperties: - '^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?4[0-9a-fA-F]{3}-?[89abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$': - type: object - additionalProperties: false - required: - - position - properties: - position: - type: integer - description: Slide's position - example: - - 0 - - 2 - instructions: - type: - - string - - 'null' - description: Instructions about what to do in this step - example: - - This is a **sleeper** - - 'Please, select the config file defined [in this link](asdf)' - additionalProperties: true - currentNodeId: - type: string - format: uuid - annotations: - type: object - x-patternProperties: - '^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?4[0-9a-fA-F]{3}-?[89abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$': - type: object - additionalProperties: false - required: - - type - - color - - attributes - properties: - type: - type: string - description: Annotation type - example: - - rect - - text - color: - type: string - description: Annotation's color - example: - - '#FF0000' - - '#0000FF' - attributes: + - x + - 'y' + title: Position type: object - description: svg attributes - additionalProperties: true - tags: - type: array - items: - type: integer - classifiers: - type: array - description: Contains the reference to the project classifiers - items: - type: string - example: 'some:id:to:a:classifier' - dev: - type: object - description: object used for development purposes only - state: - title: State - description: Project state - anyOf: - - nullable: true - - title: ProjectState - type: object - additionalProperties: false - properties: - locked: - title: Locked - description: The project lock state + deprecated: true + description: Use projects_ui.WorkbenchUI.position instead + title: Position + progress: + description: the node progress value + maximum: 100 + minimum: 0 + title: Progress + type: number + runHash: + anyOf: + - type: 'null' + - description: the hex digest of the resolved inputs +outputs hash at the time when the last outputs were generated + title: Runhash + type: string + state: allOf: - - title: ProjectLocked - type: object - additionalProperties: false + - additionalProperties: false + example: + - currentStatus: NOT_STARTED + dependencies: [] + modified: true + - currentStatus: ABORTED + dependencies: + - 42838344-03de-4ce2-8d93-589a5dcdfd05 + modified: true + - currentStatus: SUCCESS + dependencies: [] + modified: false properties: - value: - title: Value - description: True if the project is locked - type: boolean - owner: - title: Owner - description: 'If locked, the user that owns the lock' + currentStatus: allOf: - - title: Owner - type: object - additionalProperties: false - properties: - user_id: - title: User Id - type: integer - description: Owner's identifier when registered in the user's database table - example: - - 2 - first_name: - title: First Name - description: Owner first name - example: - - John - type: string - last_name: - title: Last Name - description: Owner last name - example: - - Smith - type: string - required: - - user_id - - first_name - - last_name - status: - title: Status - description: The status of the project - enum: - - CLOSED - - CLOSING - - CLONING - - OPENING - - EXPORTING - - OPENED - type: string - required: - - value - - status - state: - title: State - description: The project running state - allOf: - - title: ProjectRunningState + - description: |- + State of execution of a project's computational workflow + + SEE StateType for task state + enum: + - UNKNOWN + - PUBLISHED + - NOT_STARTED + - PENDING + - STARTED + - RETRY + - SUCCESS + - FAILED + - ABORTED + title: RunningState + type: string + default: NOT_STARTED + description: the node's current state + dependencies: + description: contains the node inputs dependencies if they need to be computed first + items: + format: uuid + type: string + title: Dependencies + type: array + uniqueItems: true + modified: + default: true + description: true if the node's outputs need to be re-computed + title: Modified + type: boolean + title: NodeState type: object - additionalProperties: false - properties: - value: - title: RunningState - description: An enumeration. - enum: - - UNKNOWN - - NOT_STARTED - - PUBLISHED - - PENDING - - STARTED - - RETRY - - SUCCESS - - FAILED - - ABORTED - type: string - required: - - value + description: The node's state object + title: State + thumbnail: + description: url of the latest screenshot of the node + example: + - 'https://placeimg.com/171/96/tech/grayscale/?0.jpg' + format: uri + maxLength: 2083 + minLength: 0 + title: Thumbnail + type: string + version: + description: semantic version number of the node + example: + - 1.0.0 + - 0.0.1 + pattern: '^(0|[1-9]\d*)(\.(0|[1-9]\d*)){2}(-(0|[1-9]\d*|\d*[-a-zA-Z][-\da-zA-Z]*)(\.(0|[1-9]\d*|\d*[-a-zA-Z][-\da-zA-Z]*))*)?(\+[-\da-zA-Z]+(\.[-\da-zA-Z-]+)*)?$' + title: Version + type: string required: - - locked - - state - quality: - type: object - title: Quality - description: Object containing Quality Assessment related data + - key + - version + - label + title: Node + type: object + required: + - uuid + - name + - description + - thumbnail + - creationDate + - lastChangeDate + - workbench + - prjOwner + - accessRights + title: osparc-simcore project + type: object responses: DefaultErrorResponse: description: Unexpected error diff --git a/services/storage/src/simcore_service_storage/api/v0/schemas/node-meta-v0.0.1-pydantic.json b/services/storage/src/simcore_service_storage/api/v0/schemas/node-meta-v0.0.1-pydantic.json new file mode 100644 index 00000000000..2efda637384 --- /dev/null +++ b/services/storage/src/simcore_service_storage/api/v0/schemas/node-meta-v0.0.1-pydantic.json @@ -0,0 +1,1823 @@ +{ + "title": "ServiceDockerData", + "description": "Static metadata for a service injected in the image labels\n\nThis is one to one with node-meta-v0.0.1.json", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "short, human readable name for the node", + "example": "Fast Counter", + "type": "string" + }, + "thumbnail": { + "title": "Thumbnail", + "description": "url to the thumbnail", + "examples": [ + "https://user-images.githubusercontent.com/32800795/61083844-ff48fb00-a42c-11e9-8e63-fa2d709c8baf.png" + ], + "minLength": 1, + "maxLength": 2083, + "format": "uri", + "type": "string" + }, + "description": { + "title": "Description", + "description": "human readable description of the purpose of the node", + "examples": [ + "Our best node type", + "The mother of all nodes, makes your numbers shine!" + ], + "type": "string" + }, + "key": { + "title": "Key", + "description": "distinctive name for the node based on the docker registry path", + "pattern": "^(simcore)/(services)/(comp|dynamic|frontend)(/[\\w/-]+)+$", + "examples": [ + "simcore/services/comp/itis/sleeper", + "simcore/services/dynamic/3dviewer" + ], + "type": "string" + }, + "version": { + "title": "Version", + "description": "service version number", + "pattern": "^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){2}(-(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*)(\\.(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*))*)?(\\+[-\\da-zA-Z]+(\\.[-\\da-zA-Z-]+)*)?$", + "examples": [ + "1.0.0", + "0.0.1" + ], + "type": "string" + }, + "integration-version": { + "title": "Integration-Version", + "description": "integration version number", + "pattern": "^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){2}(-(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*)(\\.(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*))*)?(\\+[-\\da-zA-Z]+(\\.[-\\da-zA-Z-]+)*)?$", + "examples": [ + "1.0.0" + ], + "type": "string" + }, + "type": { + "description": "service type", + "examples": [ + "computational" + ], + "allOf": [ + { + "title": "ServiceType", + "description": "An enumeration.", + "enum": [ + "computational", + "dynamic", + "frontend", + "backend" + ], + "type": "string" + } + ] + }, + "badges": { + "title": "Badges", + "type": "array", + "items": { + "title": "Badge", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "Name of the subject", + "examples": [ + "travis-ci", + "coverals.io", + "github.io" + ], + "type": "string" + }, + "image": { + "title": "Image", + "description": "Url to the badge", + "examples": [ + "https://travis-ci.org/ITISFoundation/osparc-simcore.svg?branch=master", + "https://coveralls.io/repos/github/ITISFoundation/osparc-simcore/badge.svg?branch=master", + "https://img.shields.io/website-up-down-green-red/https/itisfoundation.github.io.svg?label=documentation" + ], + "minLength": 1, + "maxLength": 2083, + "format": "uri", + "type": "string" + }, + "url": { + "title": "Url", + "description": "Link to the status", + "examples": [ + "https://travis-ci.org/ITISFoundation/osparc-simcore 'State of CI: build, test and pushing images'", + "https://coveralls.io/github/ITISFoundation/osparc-simcore?branch=master 'Test coverage'", + "https://itisfoundation.github.io/" + ], + "minLength": 1, + "maxLength": 2083, + "format": "uri", + "type": "string" + } + }, + "required": [ + "name", + "image", + "url" + ], + "additionalProperties": false + } + }, + "authors": { + "title": "Authors", + "minItems": 1, + "type": "array", + "items": { + "title": "Author", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "Name of the author", + "example": "Jim Knopf", + "type": "string" + }, + "email": { + "title": "Email", + "description": "Email address", + "examples": [ + "sun@sense.eight", + "deleen@minbar.bab" + ], + "type": "string", + "format": "email" + }, + "affiliation": { + "title": "Affiliation", + "description": "Affiliation of the author", + "examples": [ + "Sense8", + "Babylon 5" + ], + "type": "string" + } + }, + "required": [ + "name", + "email" + ], + "additionalProperties": false + } + }, + "contact": { + "title": "Contact", + "description": "email to correspond to the authors about the node", + "examples": [ + "lab@net.flix" + ], + "type": "string", + "format": "email" + }, + "inputs": { + "title": "Inputs", + "description": "definition of the inputs of this node", + "type": "object", + "patternProperties": { + "^[-_a-zA-Z0-9]+$": { + "title": "ServiceInput", + "description": "Metadata on a service input port", + "type": "object", + "properties": { + "displayOrder": { + "title": "Displayorder", + "description": "DEPRECATED: new display order is taken from the item position. This will be removed.", + "deprecated": true, + "type": "number" + }, + "label": { + "title": "Label", + "description": "short name for the property", + "example": "Age", + "type": "string" + }, + "description": { + "title": "Description", + "description": "description of the property", + "example": "Age in seconds since 1970", + "type": "string" + }, + "type": { + "title": "Type", + "description": "data type expected on this input glob matching for data type is allowed", + "pattern": "^(number|integer|boolean|string|ref_contentSchema|data:([^/\\s,]+/[^/\\s,]+|\\[[^/\\s,]+/[^/\\s,]+(,[^/\\s]+/[^/,\\s]+)*\\]))$", + "examples": [ + "number", + "boolean", + "data:*/*", + "data:text/*", + "data:[image/jpeg,image/png]", + "data:application/json", + "data:application/json;schema=https://my-schema/not/really/schema.json", + "data:application/vnd.ms-excel", + "data:text/plain", + "data:application/hdf5", + "data:application/edu.ucdavis@ceclancy.xyz" + ], + "type": "string" + }, + "contentSchema": { + "title": "Contentschema", + "description": "jsonschema of this input/output. Required when type='ref_contentSchema'", + "type": "object" + }, + "fileToKeyMap": { + "title": "Filetokeymap", + "description": "Place the data associated with the named keys in files", + "examples": [ + { + "dir/input1.txt": "key_1", + "dir33/input2.txt": "key2" + } + ], + "type": "object", + "patternProperties": { + ".+": { + "type": "string", + "pattern": "^[-_a-zA-Z0-9]+$" + } + } + }, + "unit": { + "title": "Unit", + "description": "Units, when it refers to a physical quantity", + "type": "string" + }, + "defaultValue": { + "title": "Defaultvalue", + "examples": [ + "Dog", + true + ], + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "widget": { + "title": "Widget", + "description": "custom widget to use instead of the default one determined from the data-type", + "allOf": [ + { + "title": "Widget", + "type": "object", + "properties": { + "type": { + "description": "type of the property", + "allOf": [ + { + "title": "WidgetType", + "description": "An enumeration.", + "enum": [ + "TextArea", + "SelectBox" + ], + "type": "string" + } + ] + }, + "details": { + "title": "Details", + "anyOf": [ + { + "title": "TextArea", + "type": "object", + "properties": { + "minHeight": { + "title": "Minheight", + "description": "minimum Height of the textarea", + "exclusiveMinimum": 0, + "type": "integer" + } + }, + "required": [ + "minHeight" + ], + "additionalProperties": false + }, + { + "title": "SelectBox", + "type": "object", + "properties": { + "structure": { + "title": "Structure", + "minItems": 1, + "type": "array", + "items": { + "title": "Structure", + "type": "object", + "properties": { + "key": { + "title": "Key", + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "key", + "label" + ], + "additionalProperties": false + } + } + }, + "required": [ + "structure" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "type", + "details" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "label", + "description", + "type" + ], + "additionalProperties": false, + "examples": [ + { + "displayOrder": 1, + "label": "Input files - file-wo-widget", + "description": "Files downloaded from service connected at the input", + "type": "data:*/*" + }, + { + "displayOrder": 2, + "label": "Sleep Time - v2", + "description": "Time to wait before completion", + "type": "number", + "defaultValue": 0, + "unit": "second", + "widget": { + "type": "TextArea", + "details": { + "minHeight": 3 + } + } + }, + { + "label": "Sleep Time - latest", + "description": "Time to wait before completion", + "type": "number", + "defaultValue": 0, + "unit": "second", + "widget": { + "type": "TextArea", + "details": { + "minHeight": 3 + } + } + }, + { + "label": "array_numbers", + "description": "Some array of numbers", + "type": "ref_contentSchema", + "contentSchema": { + "title": "list[number]", + "type": "array", + "items": { + "type": "number" + } + } + }, + { + "label": "my_object", + "description": "Some object", + "type": "ref_contentSchema", + "contentSchema": { + "title": "an object named A", + "type": "object", + "properties": { + "i": { + "title": "Int", + "type": "integer", + "default": 3 + }, + "b": { + "title": "Bool", + "type": "boolean" + }, + "s": { + "title": "Str", + "type": "string" + } + }, + "required": [ + "b", + "s" + ] + } + } + ] + } + } + }, + "outputs": { + "title": "Outputs", + "description": "definition of the outputs of this node", + "type": "object", + "patternProperties": { + "^[-_a-zA-Z0-9]+$": { + "title": "ServiceOutput", + "description": "Base class for service input/outputs", + "type": "object", + "properties": { + "displayOrder": { + "title": "Displayorder", + "description": "DEPRECATED: new display order is taken from the item position. This will be removed.", + "deprecated": true, + "type": "number" + }, + "label": { + "title": "Label", + "description": "short name for the property", + "example": "Age", + "type": "string" + }, + "description": { + "title": "Description", + "description": "description of the property", + "example": "Age in seconds since 1970", + "type": "string" + }, + "type": { + "title": "Type", + "description": "data type expected on this input glob matching for data type is allowed", + "pattern": "^(number|integer|boolean|string|ref_contentSchema|data:([^/\\s,]+/[^/\\s,]+|\\[[^/\\s,]+/[^/\\s,]+(,[^/\\s]+/[^/,\\s]+)*\\]))$", + "examples": [ + "number", + "boolean", + "data:*/*", + "data:text/*", + "data:[image/jpeg,image/png]", + "data:application/json", + "data:application/json;schema=https://my-schema/not/really/schema.json", + "data:application/vnd.ms-excel", + "data:text/plain", + "data:application/hdf5", + "data:application/edu.ucdavis@ceclancy.xyz" + ], + "type": "string" + }, + "contentSchema": { + "title": "Contentschema", + "description": "jsonschema of this input/output. Required when type='ref_contentSchema'", + "type": "object" + }, + "fileToKeyMap": { + "title": "Filetokeymap", + "description": "Place the data associated with the named keys in files", + "examples": [ + { + "dir/input1.txt": "key_1", + "dir33/input2.txt": "key2" + } + ], + "type": "object", + "patternProperties": { + ".+": { + "type": "string", + "pattern": "^[-_a-zA-Z0-9]+$" + } + } + }, + "unit": { + "title": "Unit", + "description": "Units, when it refers to a physical quantity", + "type": "string" + }, + "widget": { + "title": "Widget", + "description": "custom widget to use instead of the default one determined from the data-type", + "deprecated": true, + "allOf": [ + { + "title": "Widget", + "type": "object", + "properties": { + "type": { + "description": "type of the property", + "allOf": [ + { + "title": "WidgetType", + "description": "An enumeration.", + "enum": [ + "TextArea", + "SelectBox" + ], + "type": "string" + } + ] + }, + "details": { + "title": "Details", + "anyOf": [ + { + "title": "TextArea", + "type": "object", + "properties": { + "minHeight": { + "title": "Minheight", + "description": "minimum Height of the textarea", + "exclusiveMinimum": 0, + "type": "integer" + } + }, + "required": [ + "minHeight" + ], + "additionalProperties": false + }, + { + "title": "SelectBox", + "type": "object", + "properties": { + "structure": { + "title": "Structure", + "minItems": 1, + "type": "array", + "items": { + "title": "Structure", + "type": "object", + "properties": { + "key": { + "title": "Key", + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "key", + "label" + ], + "additionalProperties": false + } + } + }, + "required": [ + "structure" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "type", + "details" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "label", + "description", + "type" + ], + "additionalProperties": false, + "examples": [ + { + "displayOrder": 2, + "label": "Time Slept", + "description": "Time the service waited before completion", + "type": "number" + }, + { + "displayOrder": 2, + "label": "Time Slept - units", + "description": "Time the service waited before completion", + "type": "number", + "unit": "second" + }, + { + "label": "Time Slept - w/o displayorder", + "description": "Time the service waited before completion", + "type": "number", + "unit": "second" + }, + { + "label": "Output file 1", + "displayOrder": 4.0, + "description": "Output file uploaded from the outputs folder", + "type": "data:*/*" + } + ] + } + } + }, + "boot-options": { + "title": "Boot-Options", + "description": "Service defined boot options. These get injected in the service as env variables.", + "type": "object", + "patternProperties": { + "[a-zA-Z][a-azA-Z0-9_]*": { + "title": "BootOption", + "type": "object", + "properties": { + "label": { + "title": "Label", + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + }, + "default": { + "title": "Default", + "type": "string" + }, + "items": { + "title": "Items", + "type": "object", + "additionalProperties": { + "title": "BootChoice", + "type": "object", + "properties": { + "label": { + "title": "Label", + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + } + }, + "required": [ + "label", + "description" + ], + "examples": [ + { + "label": "Boot mode", + "description": "Start it in web page mode", + "default": "0", + "items": { + "0": { + "label": "Non Voila", + "description": "Tooltip for non Voila boot mode" + }, + "1": { + "label": "Voila", + "description": "Tooltip for Voila boot mode" + } + } + }, + { + "label": "Application theme", + "description": "Select a theme for the application", + "default": "b", + "items": { + "a": { + "label": "Clear", + "description": "Using white background" + }, + "b": { + "label": "Dark", + "description": "Using black and gray tones" + } + } + } + ] + } + } + }, + "required": [ + "label", + "description", + "default", + "items" + ], + "examples": [ + { + "label": "Boot mode", + "description": "Start it in web page mode", + "default": "0", + "items": { + "0": { + "label": "Non Voila", + "description": "Tooltip for non Voila boot mode" + }, + "1": { + "label": "Voila", + "description": "Tooltip for Voila boot mode" + } + } + }, + { + "label": "Application theme", + "description": "Select a theme for the application", + "default": "b", + "items": { + "a": { + "label": "Clear", + "description": "Using white background" + }, + "b": { + "label": "Dark", + "description": "Using black and gray tones" + } + } + } + ] + } + } + } + }, + "required": [ + "name", + "description", + "key", + "version", + "type", + "authors", + "contact", + "inputs", + "outputs" + ], + "additionalProperties": false, + "examples": [ + { + "name": "oSparc Python Runner", + "key": "simcore/services/comp/osparc-python-runner", + "type": "computational", + "integration-version": "1.0.0", + "version": "1.7.0", + "description": "oSparc Python Runner", + "contact": "smith@company.com", + "authors": [ + { + "name": "John Smith", + "email": "smith@company.com", + "affiliation": "Company" + }, + { + "name": "Richard Brown", + "email": "brown@uni.edu", + "affiliation": "University" + } + ], + "inputs": { + "input_1": { + "displayOrder": 1, + "label": "Input data", + "description": "Any code, requirements or data file", + "type": "data:*/*" + } + }, + "outputs": { + "output_1": { + "displayOrder": 1, + "label": "Output data", + "description": "All data produced by the script is zipped as output_data.zip", + "type": "data:*/*", + "fileToKeyMap": { + "output_data.zip": "output_1" + } + } + } + }, + { + "name": "oSparc Python Runner", + "key": "simcore/services/comp/osparc-python-runner", + "type": "computational", + "integration-version": "1.0.0", + "version": "1.7.0", + "description": "oSparc Python Runner", + "contact": "smith@company.com", + "authors": [ + { + "name": "John Smith", + "email": "smith@company.com", + "affiliation": "Company" + }, + { + "name": "Richard Brown", + "email": "brown@uni.edu", + "affiliation": "University" + } + ], + "inputs": { + "input_1": { + "label": "Input data", + "description": "Any code, requirements or data file", + "type": "data:*/*" + } + }, + "outputs": { + "output_1": { + "label": "Output data", + "description": "All data produced by the script is zipped as output_data.zip", + "type": "data:*/*", + "fileToKeyMap": { + "output_data.zip": "output_1" + } + } + }, + "boot-options": { + "example_service_defined_boot_mode": { + "label": "Boot mode", + "description": "Start it in web page mode", + "default": "0", + "items": { + "0": { + "label": "Non Voila", + "description": "Tooltip for non Voila boot mode" + }, + "1": { + "label": "Voila", + "description": "Tooltip for Voila boot mode" + } + } + }, + "example_service_defined_theme_selection": { + "label": "Application theme", + "description": "Select a theme for the application", + "default": "b", + "items": { + "a": { + "label": "Clear", + "description": "Using white background" + }, + "b": { + "label": "Dark", + "description": "Using black and gray tones" + } + } + } + } + } + ], + "definitions": { + "ServiceType": { + "title": "ServiceType", + "description": "An enumeration.", + "enum": [ + "computational", + "dynamic", + "frontend", + "backend" + ], + "type": "string" + }, + "Badge": { + "title": "Badge", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "Name of the subject", + "examples": [ + "travis-ci", + "coverals.io", + "github.io" + ], + "type": "string" + }, + "image": { + "title": "Image", + "description": "Url to the badge", + "examples": [ + "https://travis-ci.org/ITISFoundation/osparc-simcore.svg?branch=master", + "https://coveralls.io/repos/github/ITISFoundation/osparc-simcore/badge.svg?branch=master", + "https://img.shields.io/website-up-down-green-red/https/itisfoundation.github.io.svg?label=documentation" + ], + "minLength": 1, + "maxLength": 2083, + "format": "uri", + "type": "string" + }, + "url": { + "title": "Url", + "description": "Link to the status", + "examples": [ + "https://travis-ci.org/ITISFoundation/osparc-simcore 'State of CI: build, test and pushing images'", + "https://coveralls.io/github/ITISFoundation/osparc-simcore?branch=master 'Test coverage'", + "https://itisfoundation.github.io/" + ], + "minLength": 1, + "maxLength": 2083, + "format": "uri", + "type": "string" + } + }, + "required": [ + "name", + "image", + "url" + ], + "additionalProperties": false + }, + "Author": { + "title": "Author", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "Name of the author", + "example": "Jim Knopf", + "type": "string" + }, + "email": { + "title": "Email", + "description": "Email address", + "examples": [ + "sun@sense.eight", + "deleen@minbar.bab" + ], + "type": "string", + "format": "email" + }, + "affiliation": { + "title": "Affiliation", + "description": "Affiliation of the author", + "examples": [ + "Sense8", + "Babylon 5" + ], + "type": "string" + } + }, + "required": [ + "name", + "email" + ], + "additionalProperties": false + }, + "WidgetType": { + "title": "WidgetType", + "description": "An enumeration.", + "enum": [ + "TextArea", + "SelectBox" + ], + "type": "string" + }, + "TextArea": { + "title": "TextArea", + "type": "object", + "properties": { + "minHeight": { + "title": "Minheight", + "description": "minimum Height of the textarea", + "exclusiveMinimum": 0, + "type": "integer" + } + }, + "required": [ + "minHeight" + ], + "additionalProperties": false + }, + "Structure": { + "title": "Structure", + "type": "object", + "properties": { + "key": { + "title": "Key", + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "key", + "label" + ], + "additionalProperties": false + }, + "SelectBox": { + "title": "SelectBox", + "type": "object", + "properties": { + "structure": { + "title": "Structure", + "minItems": 1, + "type": "array", + "items": { + "title": "Structure", + "type": "object", + "properties": { + "key": { + "title": "Key", + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "key", + "label" + ], + "additionalProperties": false + } + } + }, + "required": [ + "structure" + ], + "additionalProperties": false + }, + "Widget": { + "title": "Widget", + "type": "object", + "properties": { + "type": { + "description": "type of the property", + "allOf": [ + { + "title": "WidgetType", + "description": "An enumeration.", + "enum": [ + "TextArea", + "SelectBox" + ], + "type": "string" + } + ] + }, + "details": { + "title": "Details", + "anyOf": [ + { + "title": "TextArea", + "type": "object", + "properties": { + "minHeight": { + "title": "Minheight", + "description": "minimum Height of the textarea", + "exclusiveMinimum": 0, + "type": "integer" + } + }, + "required": [ + "minHeight" + ], + "additionalProperties": false + }, + { + "title": "SelectBox", + "type": "object", + "properties": { + "structure": { + "title": "Structure", + "minItems": 1, + "type": "array", + "items": { + "title": "Structure", + "type": "object", + "properties": { + "key": { + "title": "Key", + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "key", + "label" + ], + "additionalProperties": false + } + } + }, + "required": [ + "structure" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "type", + "details" + ], + "additionalProperties": false + }, + "ServiceInput": { + "title": "ServiceInput", + "description": "Metadata on a service input port", + "type": "object", + "properties": { + "displayOrder": { + "title": "Displayorder", + "description": "DEPRECATED: new display order is taken from the item position. This will be removed.", + "deprecated": true, + "type": "number" + }, + "label": { + "title": "Label", + "description": "short name for the property", + "example": "Age", + "type": "string" + }, + "description": { + "title": "Description", + "description": "description of the property", + "example": "Age in seconds since 1970", + "type": "string" + }, + "type": { + "title": "Type", + "description": "data type expected on this input glob matching for data type is allowed", + "pattern": "^(number|integer|boolean|string|ref_contentSchema|data:([^/\\s,]+/[^/\\s,]+|\\[[^/\\s,]+/[^/\\s,]+(,[^/\\s]+/[^/,\\s]+)*\\]))$", + "examples": [ + "number", + "boolean", + "data:*/*", + "data:text/*", + "data:[image/jpeg,image/png]", + "data:application/json", + "data:application/json;schema=https://my-schema/not/really/schema.json", + "data:application/vnd.ms-excel", + "data:text/plain", + "data:application/hdf5", + "data:application/edu.ucdavis@ceclancy.xyz" + ], + "type": "string" + }, + "contentSchema": { + "title": "Contentschema", + "description": "jsonschema of this input/output. Required when type='ref_contentSchema'", + "type": "object" + }, + "fileToKeyMap": { + "title": "Filetokeymap", + "description": "Place the data associated with the named keys in files", + "examples": [ + { + "dir/input1.txt": "key_1", + "dir33/input2.txt": "key2" + } + ], + "type": "object", + "patternProperties": { + ".+": { + "type": "string", + "pattern": "^[-_a-zA-Z0-9]+$" + } + } + }, + "unit": { + "title": "Unit", + "description": "Units, when it refers to a physical quantity", + "type": "string" + }, + "defaultValue": { + "title": "Defaultvalue", + "examples": [ + "Dog", + true + ], + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "widget": { + "title": "Widget", + "description": "custom widget to use instead of the default one determined from the data-type", + "allOf": [ + { + "title": "Widget", + "type": "object", + "properties": { + "type": { + "description": "type of the property", + "allOf": [ + { + "title": "WidgetType", + "description": "An enumeration.", + "enum": [ + "TextArea", + "SelectBox" + ], + "type": "string" + } + ] + }, + "details": { + "title": "Details", + "anyOf": [ + { + "title": "TextArea", + "type": "object", + "properties": { + "minHeight": { + "title": "Minheight", + "description": "minimum Height of the textarea", + "exclusiveMinimum": 0, + "type": "integer" + } + }, + "required": [ + "minHeight" + ], + "additionalProperties": false + }, + { + "title": "SelectBox", + "type": "object", + "properties": { + "structure": { + "title": "Structure", + "minItems": 1, + "type": "array", + "items": { + "title": "Structure", + "type": "object", + "properties": { + "key": { + "title": "Key", + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "key", + "label" + ], + "additionalProperties": false + } + } + }, + "required": [ + "structure" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "type", + "details" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "label", + "description", + "type" + ], + "additionalProperties": false, + "examples": [ + { + "displayOrder": 1, + "label": "Input files - file-wo-widget", + "description": "Files downloaded from service connected at the input", + "type": "data:*/*" + }, + { + "displayOrder": 2, + "label": "Sleep Time - v2", + "description": "Time to wait before completion", + "type": "number", + "defaultValue": 0, + "unit": "second", + "widget": { + "type": "TextArea", + "details": { + "minHeight": 3 + } + } + }, + { + "label": "Sleep Time - latest", + "description": "Time to wait before completion", + "type": "number", + "defaultValue": 0, + "unit": "second", + "widget": { + "type": "TextArea", + "details": { + "minHeight": 3 + } + } + }, + { + "label": "array_numbers", + "description": "Some array of numbers", + "type": "ref_contentSchema", + "contentSchema": { + "title": "list[number]", + "type": "array", + "items": { + "type": "number" + } + } + }, + { + "label": "my_object", + "description": "Some object", + "type": "ref_contentSchema", + "contentSchema": { + "title": "an object named A", + "type": "object", + "properties": { + "i": { + "title": "Int", + "type": "integer", + "default": 3 + }, + "b": { + "title": "Bool", + "type": "boolean" + }, + "s": { + "title": "Str", + "type": "string" + } + }, + "required": [ + "b", + "s" + ] + } + } + ] + }, + "ServiceOutput": { + "title": "ServiceOutput", + "description": "Base class for service input/outputs", + "type": "object", + "properties": { + "displayOrder": { + "title": "Displayorder", + "description": "DEPRECATED: new display order is taken from the item position. This will be removed.", + "deprecated": true, + "type": "number" + }, + "label": { + "title": "Label", + "description": "short name for the property", + "example": "Age", + "type": "string" + }, + "description": { + "title": "Description", + "description": "description of the property", + "example": "Age in seconds since 1970", + "type": "string" + }, + "type": { + "title": "Type", + "description": "data type expected on this input glob matching for data type is allowed", + "pattern": "^(number|integer|boolean|string|ref_contentSchema|data:([^/\\s,]+/[^/\\s,]+|\\[[^/\\s,]+/[^/\\s,]+(,[^/\\s]+/[^/,\\s]+)*\\]))$", + "examples": [ + "number", + "boolean", + "data:*/*", + "data:text/*", + "data:[image/jpeg,image/png]", + "data:application/json", + "data:application/json;schema=https://my-schema/not/really/schema.json", + "data:application/vnd.ms-excel", + "data:text/plain", + "data:application/hdf5", + "data:application/edu.ucdavis@ceclancy.xyz" + ], + "type": "string" + }, + "contentSchema": { + "title": "Contentschema", + "description": "jsonschema of this input/output. Required when type='ref_contentSchema'", + "type": "object" + }, + "fileToKeyMap": { + "title": "Filetokeymap", + "description": "Place the data associated with the named keys in files", + "examples": [ + { + "dir/input1.txt": "key_1", + "dir33/input2.txt": "key2" + } + ], + "type": "object", + "patternProperties": { + ".+": { + "type": "string", + "pattern": "^[-_a-zA-Z0-9]+$" + } + } + }, + "unit": { + "title": "Unit", + "description": "Units, when it refers to a physical quantity", + "type": "string" + }, + "widget": { + "title": "Widget", + "description": "custom widget to use instead of the default one determined from the data-type", + "deprecated": true, + "allOf": [ + { + "title": "Widget", + "type": "object", + "properties": { + "type": { + "description": "type of the property", + "allOf": [ + { + "title": "WidgetType", + "description": "An enumeration.", + "enum": [ + "TextArea", + "SelectBox" + ], + "type": "string" + } + ] + }, + "details": { + "title": "Details", + "anyOf": [ + { + "title": "TextArea", + "type": "object", + "properties": { + "minHeight": { + "title": "Minheight", + "description": "minimum Height of the textarea", + "exclusiveMinimum": 0, + "type": "integer" + } + }, + "required": [ + "minHeight" + ], + "additionalProperties": false + }, + { + "title": "SelectBox", + "type": "object", + "properties": { + "structure": { + "title": "Structure", + "minItems": 1, + "type": "array", + "items": { + "title": "Structure", + "type": "object", + "properties": { + "key": { + "title": "Key", + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "key", + "label" + ], + "additionalProperties": false + } + } + }, + "required": [ + "structure" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "type", + "details" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "label", + "description", + "type" + ], + "additionalProperties": false, + "examples": [ + { + "displayOrder": 2, + "label": "Time Slept", + "description": "Time the service waited before completion", + "type": "number" + }, + { + "displayOrder": 2, + "label": "Time Slept - units", + "description": "Time the service waited before completion", + "type": "number", + "unit": "second" + }, + { + "label": "Time Slept - w/o displayorder", + "description": "Time the service waited before completion", + "type": "number", + "unit": "second" + }, + { + "label": "Output file 1", + "displayOrder": 4.0, + "description": "Output file uploaded from the outputs folder", + "type": "data:*/*" + } + ] + }, + "BootChoice": { + "title": "BootChoice", + "type": "object", + "properties": { + "label": { + "title": "Label", + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + } + }, + "required": [ + "label", + "description" + ], + "examples": [ + { + "label": "Boot mode", + "description": "Start it in web page mode", + "default": "0", + "items": { + "0": { + "label": "Non Voila", + "description": "Tooltip for non Voila boot mode" + }, + "1": { + "label": "Voila", + "description": "Tooltip for Voila boot mode" + } + } + }, + { + "label": "Application theme", + "description": "Select a theme for the application", + "default": "b", + "items": { + "a": { + "label": "Clear", + "description": "Using white background" + }, + "b": { + "label": "Dark", + "description": "Using black and gray tones" + } + } + } + ] + }, + "BootOption": { + "title": "BootOption", + "type": "object", + "properties": { + "label": { + "title": "Label", + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + }, + "default": { + "title": "Default", + "type": "string" + }, + "items": { + "title": "Items", + "type": "object", + "additionalProperties": { + "title": "BootChoice", + "type": "object", + "properties": { + "label": { + "title": "Label", + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + } + }, + "required": [ + "label", + "description" + ], + "examples": [ + { + "label": "Boot mode", + "description": "Start it in web page mode", + "default": "0", + "items": { + "0": { + "label": "Non Voila", + "description": "Tooltip for non Voila boot mode" + }, + "1": { + "label": "Voila", + "description": "Tooltip for Voila boot mode" + } + } + }, + { + "label": "Application theme", + "description": "Select a theme for the application", + "default": "b", + "items": { + "a": { + "label": "Clear", + "description": "Using white background" + }, + "b": { + "label": "Dark", + "description": "Using black and gray tones" + } + } + } + ] + } + } + }, + "required": [ + "label", + "description", + "default", + "items" + ], + "examples": [ + { + "label": "Boot mode", + "description": "Start it in web page mode", + "default": "0", + "items": { + "0": { + "label": "Non Voila", + "description": "Tooltip for non Voila boot mode" + }, + "1": { + "label": "Voila", + "description": "Tooltip for Voila boot mode" + } + } + }, + { + "label": "Application theme", + "description": "Select a theme for the application", + "default": "b", + "items": { + "a": { + "label": "Clear", + "description": "Using white background" + }, + "b": { + "label": "Dark", + "description": "Using black and gray tones" + } + } + } + ] + } + } +} diff --git a/services/storage/src/simcore_service_storage/api/v0/schemas/node-meta-v0.0.1.json b/services/storage/src/simcore_service_storage/api/v0/schemas/node-meta-v0.0.1.json deleted file mode 100644 index a47f6c2ad3b..00000000000 --- a/services/storage/src/simcore_service_storage/api/v0/schemas/node-meta-v0.0.1.json +++ /dev/null @@ -1,477 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "simcore node", - "description": "Description of a simcore node 'class' with input and output", - "type": "object", - "additionalProperties": false, - "required": [ - "key", - "version", - "type", - "name", - "description", - "authors", - "contact", - "inputs", - "outputs" - ], - "properties": { - "key": { - "type": "string", - "description": "distinctive name for the node based on the docker registry path", - "pattern": "^(simcore)/(services)/(comp|dynamic|frontend)(/[\\w/-]+)+$", - "examples": [ - "simcore/services/comp/itis/sleeper", - "simcore/services/dynamic/3dviewer" - ] - }, - "integration-version": { - "type": "string", - "description": "integration version number", - "pattern": "^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){2}(-(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*)(\\.(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*))*)?(\\+[-\\da-zA-Z]+(\\.[-\\da-zA-Z-]+)*)?$", - "examples": [ - "1.0.0" - ] - }, - "version": { - "type": "string", - "description": "service version number", - "pattern": "^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){2}(-(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*)(\\.(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*))*)?(\\+[-\\da-zA-Z]+(\\.[-\\da-zA-Z-]+)*)?$", - "examples": [ - "1.0.0", - "0.0.1" - ] - }, - "type": { - "type": "string", - "description": "service type", - "enum": [ - "frontend", - "computational", - "dynamic" - ], - "examples": [ - "computational" - ] - }, - "name": { - "type": "string", - "description": "short, human readable name for the node", - "examples": [ - "Fast Counter" - ] - }, - "thumbnail": { - "type": "string", - "description": "url to the thumbnail", - "examples": [ - "https://user-images.githubusercontent.com/32800795/61083844-ff48fb00-a42c-11e9-8e63-fa2d709c8baf.png" - ] - }, - "badges": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name", - "image", - "url" - ], - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "description": "Name of the subject", - "examples": [ - "travis-ci", - "coverals.io", - "github.io" - ] - }, - "image": { - "type": "string", - "description": "Url to the shield", - "examples": [ - "https://travis-ci.org/ITISFoundation/osparc-simcore.svg?branch=master", - "https://coveralls.io/repos/github/ITISFoundation/osparc-simcore/badge.svg?branch=master", - "https://img.shields.io/website-up-down-green-red/https/itisfoundation.github.io.svg?label=documentation" - ] - }, - "url": { - "type": "string", - "description": "Link to status", - "examples": [ - "https://travis-ci.org/ITISFoundation/osparc-simcore 'State of CI: build, test and pushing images'", - "https://coveralls.io/github/ITISFoundation/osparc-simcore?branch=master 'Test coverage'", - "https://itisfoundation.github.io/" - ] - } - } - } - }, - "description": { - "type": "string", - "description": "human readable description of the purpose of the node", - "examples": [ - "Our best node type", - "The mother of all nodes, makes your numbers shine!" - ] - }, - "authors": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "name", - "email" - ], - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "description": "Name of the author", - "examples": [ - "Sun Bak", - "Delenn" - ] - }, - "email": { - "description": "Email address", - "type": "string", - "format": "email", - "examples": [ - "sun@sense.eight", - "deleen@minbar.bab" - ] - }, - "affiliation": { - "description": "Affiliation of the author", - "type": "string", - "examples": [ - "Sense8", - "Babylon 5" - ] - } - } - } - }, - "contact": { - "type": "string", - "format": "email", - "description": "email to correspond to the authors about the node", - "examples": [ - "lab@net.flix" - ] - }, - "inputs": { - "type": "object", - "description": "definition of the inputs of this node", - "patternProperties": { - "^[-_a-zA-Z0-9]+$": { - "type": "object", - "description": "all the input configurable for this service", - "additionalProperties": false, - "required": [ - "displayOrder", - "label", - "description", - "type" - ], - "properties": { - "displayOrder": { - "description": "DEPRECATED: new display order is taken from the item position. This property will be removed.", - "deprecated": true, - "type": "number" - }, - "label": { - "type": "string", - "description": "short name for the property", - "examples": [ - "Age" - ] - }, - "description": { - "type": "string", - "description": "description of the property", - "examples": [ - "Age in seconds since 1970" - ] - }, - "type": { - "type": "string", - "pattern": "^(number|integer|boolean|string|ref_contentSchema|data:([^/\\s,]+/[^/\\s,]+|\\[[^/\\s,]+/[^/\\s,]+(,[^/\\s]+/[^/,\\s]+)*\\]))$", - "description": "data type expected on this input glob matching for data type is allowed", - "examples": [ - "number", - "boolean", - "data:*/*", - "data:text/*", - "data:[image/jpeg,image/png]", - "data:application/json", - "data:application/json;schema=https://my-schema/not/really/schema.json", - "data:application/vnd.ms-excel", - "data:text/plain", - "data:application/hdf5", - "data:application/edu.ucdavis@ceclancy.xyz" - ] - }, - "contentSchema": { - "title": "Content Schema", - "description": "jsonschema of the content at this input/output. Required when type='ref_contentSchema'", - "type": "object" - }, - "fileToKeyMap": { - "description": "Place the data associated with the named keys in files", - "type": "object", - "patternProperties": { - ".+": { - "type": "string", - "pattern": "^[-_a-zA-Z0-9]+$" - } - }, - "examples": [ - { - "dir/input1.txt": "key_1", - "dir33/input2.txt": "key2" - } - ] - }, - "defaultValue": { - "description": "initial value for this input", - "type": [ - "string", - "number", - "integer", - "boolean" - ], - "examples": [ - "Dog", - true - ] - }, - "unit": { - "title": "Unit", - "description": "Units of this input value, if a physical quantity", - "type": "string" - }, - "widget": { - "description": "custom widget to use instead of the default one determined from the data-type", - "anyOf": [ - { - "type": "object", - "additionalProperties": false, - "required": [ - "type" - ], - "properties": { - "type": { - "description": "type of the property", - "type": "string", - "enum": [ - "TextArea" - ] - }, - "minHeight": { - "description": "minimum Height of the textarea", - "type": "integer", - "minimum": 1 - } - } - }, - { - "type": "object", - "additionalProperties": false, - "required": [ - "type", - "structure" - ], - "properties": { - "type": { - "description": "type of the property", - "type": "string", - "enum": [ - "SelectBox" - ] - }, - "structure": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "additionalProperties": false, - "required": [ - "key", - "label" - ], - "properties": { - "key": { - "type": [ - "string", - "boolean", - "number" - ] - }, - "label": { - "type": "string" - } - }, - "examples": [ - [ - { - "key": "rat", - "label": "The Rat" - }, - { - "key": "dog", - "label": "Bello the Dog" - } - ] - ] - } - } - } - } - ] - } - } - } - } - }, - "outputs": { - "type": "object", - "description": "definition of the outputs of this node", - "patternProperties": { - "^[-_a-zA-Z0-9]+$": { - "type": "object", - "description": "all the output produced by this node", - "additionalProperties": false, - "required": [ - "displayOrder", - "label", - "description", - "type" - ], - "properties": { - "displayOrder": { - "type": "number", - "description": "use this to numerically sort the properties for display", - "examples": [ - 1, - -0.2 - ] - }, - "label": { - "type": "string", - "description": "short name for the property", - "examples": [ - "Age" - ] - }, - "description": { - "type": "string", - "description": "description of the property", - "examples": [ - "Age in seconds since 1970" - ] - }, - "type": { - "type": "string", - "pattern": "^(number|integer|boolean|string|ref_contentSchema|data:[^/\\s,]+/[^/\\s,]+)$", - "description": "data type expected on this output", - "examples": [ - "number", - "integer", - "boolean", - "string", - "data:application/json", - "data:application/vnd.ms-excel ", - "data:text/plain", - "data:application/hdf5" - ] - }, - "contentSchema": { - "title": "Content Schema", - "description": "jsonschema of this input/output. Required when type='ref_contentSchema'", - "type": "object" - }, - "fileToKeyMap": { - "description": "Place the data stored in the named files and store it in the locations pointed to by the respective output key.", - "type": "object", - "patternProperties": { - ".+": { - "type": "string", - "pattern": "^[-_a-zA-Z0-9]+$" - } - }, - "examples": [ - { - "dir/input1.txt": "key_1", - "dir33/input2.txt": "key2" - } - ] - }, - "unit": { - "title": "Unit", - "description": "Units of the output value, if a physical quantity", - "type": "string" - } - } - } - } - }, - "boot-options": { - "title": "Boot Options", - "description": "Service defined boot options. These get injected in the service as env variables.", - "type": "object", - "patternProperties": { - "^[_a-zA-Z0-9]+$": { - "title": "BootOptionMode", - "type": "object", - "properties": { - "label": { - "title": "Label", - "type": "string" - }, - "description": { - "title": "Description", - "type": "string" - }, - "default": { - "title": "Default", - "type": "string" - }, - "items": { - "title": "Items", - "type": "object", - "additionalProperties": { - "title": "BootOptionItem", - "type": "object", - "properties": { - "label": { - "title": "Label", - "type": "string" - }, - "description": { - "title": "Description", - "type": "string" - } - }, - "required": [ - "label", - "description" - ] - } - } - }, - "required": [ - "label", - "description", - "default", - "items" - ] - } - } - } - } -} diff --git a/services/storage/src/simcore_service_storage/api/v0/schemas/project-v0.0.1-pydantic.json b/services/storage/src/simcore_service_storage/api/v0/schemas/project-v0.0.1-pydantic.json new file mode 100644 index 00000000000..91a645e4a7a --- /dev/null +++ b/services/storage/src/simcore_service_storage/api/v0/schemas/project-v0.0.1-pydantic.json @@ -0,0 +1,2724 @@ +{ + "title": "osparc-simcore project", + "type": "object", + "properties": { + "uuid": { + "title": "Uuid", + "description": "project unique identifier", + "examples": [ + "07640335-a91f-468c-ab69-a374fa82078d", + "9bcf8feb-c1b1-41b6-b201-639cd6ccdba8" + ], + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "description": "project name", + "examples": [ + "Temporal Distortion Simulator" + ], + "type": "string" + }, + "description": { + "title": "Description", + "description": "longer one-line description about the project", + "examples": [ + "Dabbling in temporal transitions ..." + ], + "type": "string" + }, + "thumbnail": { + "title": "Thumbnail", + "description": "url of the project thumbnail", + "examples": [ + "https://placeimg.com/171/96/tech/grayscale/?0.jpg" + ], + "minLength": 0, + "maxLength": 2083, + "format": "uri", + "type": "string" + }, + "creationDate": { + "title": "Creationdate", + "description": "project creation date", + "pattern": "\\d{4}-(12|11|10|0?[1-9])-(31|30|[0-2]?\\d)T(2[0-3]|1\\d|0?[0-9])(:(\\d|[0-5]\\d)){2}(\\.\\d{3})?Z", + "examples": [ + "2018-07-01T11:13:43Z" + ], + "type": "string" + }, + "lastChangeDate": { + "title": "Lastchangedate", + "description": "last save date", + "pattern": "\\d{4}-(12|11|10|0?[1-9])-(31|30|[0-2]?\\d)T(2[0-3]|1\\d|0?[0-9])(:(\\d|[0-5]\\d)){2}(\\.\\d{3})?Z", + "examples": [ + "2018-07-01T11:13:43Z" + ], + "type": "string" + }, + "workbench": { + "title": "Workbench", + "description": "Project's pipeline", + "type": "object", + "patternProperties": { + "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$": { + "title": "Node", + "type": "object", + "properties": { + "key": { + "title": "Key", + "description": "distinctive name for the node based on the docker registry path", + "examples": [ + "simcore/services/comp/itis/sleeper", + "simcore/services/dynamic/3dviewer", + "simcore/services/frontend/file-picker" + ], + "pattern": "^(simcore)/(services)/(comp|dynamic|frontend)(/[\\w/-]+)+$", + "type": "string" + }, + "version": { + "title": "Version", + "description": "semantic version number of the node", + "examples": [ + "1.0.0", + "0.0.1" + ], + "pattern": "^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){2}(-(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*)(\\.(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*))*)?(\\+[-\\da-zA-Z]+(\\.[-\\da-zA-Z-]+)*)?$", + "type": "string" + }, + "label": { + "title": "Label", + "description": "The short name of the node", + "examples": [ + "JupyterLab" + ], + "type": "string" + }, + "progress": { + "title": "Progress", + "description": "the node progress value", + "minimum": 0, + "maximum": 100, + "type": "number" + }, + "thumbnail": { + "title": "Thumbnail", + "description": "url of the latest screenshot of the node", + "examples": [ + "https://placeimg.com/171/96/tech/grayscale/?0.jpg" + ], + "minLength": 0, + "maxLength": 2083, + "format": "uri", + "type": "string" + }, + "runHash": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "Runhash", + "description": "the hex digest of the resolved inputs +outputs hash at the time when the last outputs were generated", + "type": "string" + } + ] + }, + "inputs": { + "title": "Inputs", + "description": "values of input properties", + "type": "object", + "patternProperties": { + "^[-_a-zA-Z0-9]+$": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "string", + "format": "json-string" + }, + { + "type": "string" + }, + { + "title": "PortLink", + "description": "I/O port type to reference to an output port of another node in the same project", + "type": "object", + "properties": { + "nodeUuid": { + "title": "Nodeuuid", + "description": "The node to get the port output from", + "type": "string", + "format": "uuid" + }, + "output": { + "title": "Output", + "description": "The port key in the node given by nodeUuid", + "pattern": "^[-_a-zA-Z0-9]+$", + "type": "string" + } + }, + "required": [ + "nodeUuid", + "output" + ], + "additionalProperties": false, + "examples": [ + { + "nodeUuid": "da5068e0-8a8d-4fb9-9516-56e5ddaef15b", + "output": "out_2" + } + ] + }, + { + "title": "SimCoreFileLink", + "description": "I/O port type to hold a link to a file in simcore S3 storage", + "type": "object", + "properties": { + "store": { + "title": "Store", + "description": "The store identifier: 0 for simcore S3, 1 for datcore", + "type": "integer" + }, + "path": { + "title": "Path", + "description": "The path to the file in the storage provider domain", + "anyOf": [ + { + "type": "string", + "pattern": "^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\\/(.+)$" + }, + { + "type": "string", + "pattern": "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + } + ] + }, + "label": { + "title": "Label", + "description": "The real file name", + "type": "string" + }, + "eTag": { + "title": "Etag", + "description": "Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box).", + "type": "string" + }, + "dataset": { + "title": "Dataset", + "deprecated": true, + "type": "string" + } + }, + "required": [ + "store", + "path" + ], + "additionalProperties": false, + "examples": [ + { + "store": 0, + "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt", + "eTag": "859fda0cb82fc4acb4686510a172d9a9-1", + "label": "input.txt" + }, + { + "store": "0", + "path": "50339632-ee1d-11ec-a0c2-02420a0194e4/23b1522f-225f-5a4c-9158-c4c19a70d4a8/output.h5", + "eTag": "f7e4c7076761a42a871e978c8691c676" + }, + { + "store": 0, + "path": "api/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt" + }, + { + "store": 0, + "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/d4442ca4-23fd-5b6b-ba6d-0b75f711c109/y_1D.txt" + } + ] + }, + { + "title": "DatCoreFileLink", + "description": "I/O port type to hold a link to a file in DATCORE storage", + "type": "object", + "properties": { + "store": { + "title": "Store", + "description": "The store identifier: 0 for simcore S3, 1 for datcore", + "type": "integer" + }, + "path": { + "title": "Path", + "description": "The path to the file in the storage provider domain", + "anyOf": [ + { + "type": "string", + "pattern": "^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\\/(.+)$" + }, + { + "type": "string", + "pattern": "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + } + ] + }, + "label": { + "title": "Label", + "description": "The real file name", + "type": "string" + }, + "eTag": { + "title": "Etag", + "description": "Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box).", + "type": "string" + }, + "dataset": { + "title": "Dataset", + "description": "Unique identifier to access the dataset on datcore (REQUIRED for datcore)", + "type": "string" + } + }, + "required": [ + "store", + "path", + "label", + "dataset" + ], + "additionalProperties": false, + "examples": [ + { + "store": 1, + "dataset": "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4", + "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", + "label": "initial_WTstates" + }, + { + "store": 1, + "dataset": "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4", + "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", + "label": "initial_WTstates" + } + ] + }, + { + "title": "DownloadLink", + "description": "I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)", + "type": "object", + "properties": { + "downloadLink": { + "title": "Downloadlink", + "minLength": 1, + "maxLength": 65536, + "format": "uri", + "type": "string" + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "downloadLink" + ], + "additionalProperties": false, + "examples": [ + { + "downloadLink": "https://fakeimg.pl/250x100/" + } + ] + }, + { + "type": "array", + "items": {} + }, + { + "type": "object" + } + ] + } + } + }, + "inputsUnits": { + "title": "Inputsunits", + "description": "Overrides default unit (if any) defined in the service for each port", + "type": "object", + "patternProperties": { + "^[-_a-zA-Z0-9]+$": { + "type": "string" + } + } + }, + "inputAccess": { + "description": "map with key - access level pairs", + "type": "object", + "patternProperties": { + "^[-_a-zA-Z0-9]+$": { + "title": "AccessEnum", + "description": "An enumeration.", + "enum": [ + "ReadAndWrite", + "Invisible", + "ReadOnly" + ], + "type": "string" + } + } + }, + "inputNodes": { + "title": "Inputnodes", + "description": "node IDs of where the node is connected to", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "outputs": { + "title": "Outputs", + "description": "values of output properties", + "type": "object", + "patternProperties": { + "^[-_a-zA-Z0-9]+$": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "string", + "format": "json-string" + }, + { + "type": "string" + }, + { + "title": "SimCoreFileLink", + "description": "I/O port type to hold a link to a file in simcore S3 storage", + "type": "object", + "properties": { + "store": { + "title": "Store", + "description": "The store identifier: 0 for simcore S3, 1 for datcore", + "type": "integer" + }, + "path": { + "title": "Path", + "description": "The path to the file in the storage provider domain", + "anyOf": [ + { + "type": "string", + "pattern": "^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\\/(.+)$" + }, + { + "type": "string", + "pattern": "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + } + ] + }, + "label": { + "title": "Label", + "description": "The real file name", + "type": "string" + }, + "eTag": { + "title": "Etag", + "description": "Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box).", + "type": "string" + }, + "dataset": { + "title": "Dataset", + "deprecated": true, + "type": "string" + } + }, + "required": [ + "store", + "path" + ], + "additionalProperties": false, + "examples": [ + { + "store": 0, + "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt", + "eTag": "859fda0cb82fc4acb4686510a172d9a9-1", + "label": "input.txt" + }, + { + "store": "0", + "path": "50339632-ee1d-11ec-a0c2-02420a0194e4/23b1522f-225f-5a4c-9158-c4c19a70d4a8/output.h5", + "eTag": "f7e4c7076761a42a871e978c8691c676" + }, + { + "store": 0, + "path": "api/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt" + }, + { + "store": 0, + "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/d4442ca4-23fd-5b6b-ba6d-0b75f711c109/y_1D.txt" + } + ] + }, + { + "title": "DatCoreFileLink", + "description": "I/O port type to hold a link to a file in DATCORE storage", + "type": "object", + "properties": { + "store": { + "title": "Store", + "description": "The store identifier: 0 for simcore S3, 1 for datcore", + "type": "integer" + }, + "path": { + "title": "Path", + "description": "The path to the file in the storage provider domain", + "anyOf": [ + { + "type": "string", + "pattern": "^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\\/(.+)$" + }, + { + "type": "string", + "pattern": "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + } + ] + }, + "label": { + "title": "Label", + "description": "The real file name", + "type": "string" + }, + "eTag": { + "title": "Etag", + "description": "Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box).", + "type": "string" + }, + "dataset": { + "title": "Dataset", + "description": "Unique identifier to access the dataset on datcore (REQUIRED for datcore)", + "type": "string" + } + }, + "required": [ + "store", + "path", + "label", + "dataset" + ], + "additionalProperties": false, + "examples": [ + { + "store": 1, + "dataset": "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4", + "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", + "label": "initial_WTstates" + }, + { + "store": 1, + "dataset": "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4", + "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", + "label": "initial_WTstates" + } + ] + }, + { + "title": "DownloadLink", + "description": "I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)", + "type": "object", + "properties": { + "downloadLink": { + "title": "Downloadlink", + "minLength": 1, + "maxLength": 65536, + "format": "uri", + "type": "string" + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "downloadLink" + ], + "additionalProperties": false, + "examples": [ + { + "downloadLink": "https://fakeimg.pl/250x100/" + } + ] + }, + { + "type": "array", + "items": {} + }, + { + "type": "object" + } + ] + } + } + }, + "outputNode": { + "title": "Outputnode", + "deprecated": true, + "type": "boolean" + }, + "outputNodes": { + "title": "Outputnodes", + "description": "Used in group-nodes. Node IDs of those connected to the output", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "parent": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "Parent", + "description": "Parent's (group-nodes') node ID s. Used to group", + "type": "string", + "format": "uuid" + } + ] + }, + "position": { + "title": "Position", + "description": "Use projects_ui.WorkbenchUI.position instead", + "deprecated": true, + "allOf": [ + { + "title": "Position", + "type": "object", + "properties": { + "x": { + "title": "X", + "description": "The x position", + "example": [ + "12" + ], + "type": "integer" + }, + "y": { + "title": "Y", + "description": "The y position", + "example": [ + "15" + ], + "type": "integer" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + ] + }, + "state": { + "title": "State", + "description": "The node's state object", + "allOf": [ + { + "title": "NodeState", + "type": "object", + "properties": { + "modified": { + "title": "Modified", + "description": "true if the node's outputs need to be re-computed", + "default": true, + "type": "boolean" + }, + "dependencies": { + "title": "Dependencies", + "description": "contains the node inputs dependencies if they need to be computed first", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "uniqueItems": true + }, + "currentStatus": { + "description": "the node's current state", + "default": "NOT_STARTED", + "allOf": [ + { + "title": "RunningState", + "description": "State of execution of a project's computational workflow\n\nSEE StateType for task state", + "enum": [ + "UNKNOWN", + "PUBLISHED", + "NOT_STARTED", + "PENDING", + "STARTED", + "RETRY", + "SUCCESS", + "FAILED", + "ABORTED" + ], + "type": "string" + } + ] + } + }, + "additionalProperties": false, + "examples": [ + { + "modified": true, + "dependencies": [], + "currentStatus": "NOT_STARTED" + }, + { + "modified": true, + "dependencies": [ + "42838344-03de-4ce2-8d93-589a5dcdfd05" + ], + "currentStatus": "ABORTED" + }, + { + "modified": false, + "dependencies": [], + "currentStatus": "SUCCESS" + } + ] + } + ] + }, + "bootOptions": { + "title": "Bootoptions", + "description": "Some services provide alternative parameters to be injected at boot time. The user selection should be stored here, and it will overwrite the services's defaults.", + "type": "object", + "patternProperties": { + "[a-zA-Z][a-azA-Z0-9_]*": { + "type": "string" + } + } + } + }, + "required": [ + "key", + "version", + "label" + ], + "additionalProperties": false + } + } + }, + "prjOwner": { + "title": "Prjowner", + "description": "user email", + "type": "string", + "format": "email" + }, + "accessRights": { + "title": "Accessrights", + "description": "object containing the GroupID as key and read/write/execution permissions as value", + "type": "object", + "patternProperties": { + "^\\S+$": { + "title": "AccessRights", + "type": "object", + "properties": { + "read": { + "title": "Read", + "description": "gives read access", + "type": "boolean" + }, + "write": { + "title": "Write", + "description": "gives write access", + "type": "boolean" + }, + "delete": { + "title": "Delete", + "description": "gives deletion rights", + "type": "boolean" + } + }, + "required": [ + "read", + "write", + "delete" + ], + "additionalProperties": false + } + } + }, + "tags": { + "title": "Tags", + "default": [], + "type": "array", + "items": { + "type": "integer" + } + }, + "classifiers": { + "title": "Classifiers", + "description": "Contains the reference to the project classifiers", + "examples": [ + "some:id:to:a:classifier" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "state": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "ProjectState", + "type": "object", + "properties": { + "locked": { + "title": "Locked", + "description": "The project lock state", + "allOf": [ + { + "title": "ProjectLocked", + "type": "object", + "properties": { + "value": { + "title": "Value", + "description": "True if the project is locked", + "type": "boolean" + }, + "owner": { + "title": "Owner", + "description": "If locked, the user that owns the lock", + "allOf": [ + { + "title": "Owner", + "type": "object", + "properties": { + "user_id": { + "title": "User Id", + "description": "Owner's identifier when registered in the user's database table", + "examples": [ + 2 + ], + "type": "integer" + }, + "first_name": { + "title": "First Name", + "description": "Owner first name", + "examples": [ + "John" + ], + "type": "string" + }, + "last_name": { + "title": "Last Name", + "description": "Owner last name", + "examples": [ + "Smith" + ], + "type": "string" + } + }, + "required": [ + "user_id", + "first_name", + "last_name" + ], + "additionalProperties": false + } + ] + }, + "status": { + "description": "The status of the project", + "allOf": [ + { + "title": "ProjectStatus", + "description": "An enumeration.", + "enum": [ + "CLOSED", + "CLOSING", + "CLONING", + "EXPORTING", + "OPENING", + "OPENED" + ], + "type": "string" + } + ] + } + }, + "required": [ + "value", + "status" + ], + "additionalProperties": false, + "examples": [ + { + "value": false, + "status": "CLOSED" + }, + { + "value": true, + "status": "OPENED", + "owner": { + "user_id": 123, + "first_name": "Johnny", + "last_name": "Cash" + } + } + ] + } + ] + }, + "state": { + "title": "State", + "description": "The project running state", + "allOf": [ + { + "title": "ProjectRunningState", + "type": "object", + "properties": { + "value": { + "description": "The running state of the project", + "examples": [ + "STARTED" + ], + "allOf": [ + { + "title": "RunningState", + "description": "State of execution of a project's computational workflow\n\nSEE StateType for task state", + "enum": [ + "UNKNOWN", + "PUBLISHED", + "NOT_STARTED", + "PENDING", + "STARTED", + "RETRY", + "SUCCESS", + "FAILED", + "ABORTED" + ], + "type": "string" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "locked", + "state" + ], + "additionalProperties": false + } + ] + }, + "ui": { + "title": "StudyUI", + "type": "object", + "properties": { + "workbench": { + "title": "Workbench", + "type": "object", + "patternProperties": { + "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$": { + "title": "WorkbenchUI", + "type": "object", + "properties": { + "position": { + "title": "Position", + "description": "The node position in the workbench", + "allOf": [ + { + "title": "Position", + "type": "object", + "properties": { + "x": { + "title": "X", + "description": "The x position", + "example": [ + "12" + ], + "type": "integer" + }, + "y": { + "title": "Y", + "description": "The y position", + "example": [ + "15" + ], + "type": "integer" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + ] + }, + "marker": { + "title": "Marker", + "type": "object", + "properties": { + "color": { + "title": "Color", + "type": "string", + "format": "color" + } + }, + "required": [ + "color" + ], + "additionalProperties": false + } + }, + "required": [ + "position" + ], + "additionalProperties": false + } + } + }, + "slideshow": { + "title": "Slideshow", + "type": "object", + "patternProperties": { + "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$": { + "title": "Slideshow", + "type": "object", + "properties": { + "position": { + "title": "Position", + "type": "integer" + }, + "instructions": { + "title": "Instructions", + "type": "string" + } + }, + "required": [ + "position" + ] + } + } + }, + "currentNodeId": { + "title": "Currentnodeid", + "type": "string", + "format": "uuid" + }, + "annotations": { + "title": "Annotations", + "type": "object", + "patternProperties": { + "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$": { + "title": "Annotation", + "type": "object", + "properties": { + "type": { + "title": "Type", + "enum": [ + "rect", + "text" + ], + "type": "string" + }, + "color": { + "title": "Color", + "type": "string", + "format": "color" + }, + "attributes": { + "title": "Attributes", + "description": "svg attributes", + "type": "object" + } + }, + "required": [ + "type", + "color", + "attributes" + ], + "additionalProperties": false, + "examples": [ + { + "type": "rect", + "color": "#FF0000", + "attributes": { + "x": 415, + "y": 100, + "width": 117, + "height": 26 + } + }, + { + "type": "text", + "color": "#0000FF", + "attributes": { + "x": 415, + "y": 100, + "text": "Hey!" + } + } + ] + } + } + } + } + }, + "quality": { + "title": "Quality", + "description": "stores the study quality assessment", + "default": {}, + "type": "object" + }, + "dev": { + "title": "Dev", + "description": "object used for development purposes only", + "type": "object" + } + }, + "required": [ + "uuid", + "name", + "description", + "thumbnail", + "creationDate", + "lastChangeDate", + "workbench", + "prjOwner", + "accessRights" + ], + "additionalProperties": false, + "definitions": { + "PortLink": { + "title": "PortLink", + "description": "I/O port type to reference to an output port of another node in the same project", + "type": "object", + "properties": { + "nodeUuid": { + "title": "Nodeuuid", + "description": "The node to get the port output from", + "type": "string", + "format": "uuid" + }, + "output": { + "title": "Output", + "description": "The port key in the node given by nodeUuid", + "pattern": "^[-_a-zA-Z0-9]+$", + "type": "string" + } + }, + "required": [ + "nodeUuid", + "output" + ], + "additionalProperties": false, + "examples": [ + { + "nodeUuid": "da5068e0-8a8d-4fb9-9516-56e5ddaef15b", + "output": "out_2" + } + ] + }, + "SimCoreFileLink": { + "title": "SimCoreFileLink", + "description": "I/O port type to hold a link to a file in simcore S3 storage", + "type": "object", + "properties": { + "store": { + "title": "Store", + "description": "The store identifier: 0 for simcore S3, 1 for datcore", + "type": "integer" + }, + "path": { + "title": "Path", + "description": "The path to the file in the storage provider domain", + "anyOf": [ + { + "type": "string", + "pattern": "^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\\/(.+)$" + }, + { + "type": "string", + "pattern": "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + } + ] + }, + "label": { + "title": "Label", + "description": "The real file name", + "type": "string" + }, + "eTag": { + "title": "Etag", + "description": "Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box).", + "type": "string" + }, + "dataset": { + "title": "Dataset", + "deprecated": true, + "type": "string" + } + }, + "required": [ + "store", + "path" + ], + "additionalProperties": false, + "examples": [ + { + "store": 0, + "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt", + "eTag": "859fda0cb82fc4acb4686510a172d9a9-1", + "label": "input.txt" + }, + { + "store": "0", + "path": "50339632-ee1d-11ec-a0c2-02420a0194e4/23b1522f-225f-5a4c-9158-c4c19a70d4a8/output.h5", + "eTag": "f7e4c7076761a42a871e978c8691c676" + }, + { + "store": 0, + "path": "api/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt" + }, + { + "store": 0, + "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/d4442ca4-23fd-5b6b-ba6d-0b75f711c109/y_1D.txt" + } + ] + }, + "DatCoreFileLink": { + "title": "DatCoreFileLink", + "description": "I/O port type to hold a link to a file in DATCORE storage", + "type": "object", + "properties": { + "store": { + "title": "Store", + "description": "The store identifier: 0 for simcore S3, 1 for datcore", + "type": "integer" + }, + "path": { + "title": "Path", + "description": "The path to the file in the storage provider domain", + "anyOf": [ + { + "type": "string", + "pattern": "^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\\/(.+)$" + }, + { + "type": "string", + "pattern": "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + } + ] + }, + "label": { + "title": "Label", + "description": "The real file name", + "type": "string" + }, + "eTag": { + "title": "Etag", + "description": "Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box).", + "type": "string" + }, + "dataset": { + "title": "Dataset", + "description": "Unique identifier to access the dataset on datcore (REQUIRED for datcore)", + "type": "string" + } + }, + "required": [ + "store", + "path", + "label", + "dataset" + ], + "additionalProperties": false, + "examples": [ + { + "store": 1, + "dataset": "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4", + "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", + "label": "initial_WTstates" + }, + { + "store": 1, + "dataset": "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4", + "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", + "label": "initial_WTstates" + } + ] + }, + "DownloadLink": { + "title": "DownloadLink", + "description": "I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)", + "type": "object", + "properties": { + "downloadLink": { + "title": "Downloadlink", + "minLength": 1, + "maxLength": 65536, + "format": "uri", + "type": "string" + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "downloadLink" + ], + "additionalProperties": false, + "examples": [ + { + "downloadLink": "https://fakeimg.pl/250x100/" + } + ] + }, + "AccessEnum": { + "title": "AccessEnum", + "description": "An enumeration.", + "enum": [ + "ReadAndWrite", + "Invisible", + "ReadOnly" + ], + "type": "string" + }, + "Position": { + "title": "Position", + "type": "object", + "properties": { + "x": { + "title": "X", + "description": "The x position", + "example": [ + "12" + ], + "type": "integer" + }, + "y": { + "title": "Y", + "description": "The y position", + "example": [ + "15" + ], + "type": "integer" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "RunningState": { + "title": "RunningState", + "description": "State of execution of a project's computational workflow\n\nSEE StateType for task state", + "enum": [ + "UNKNOWN", + "PUBLISHED", + "NOT_STARTED", + "PENDING", + "STARTED", + "RETRY", + "SUCCESS", + "FAILED", + "ABORTED" + ], + "type": "string" + }, + "NodeState": { + "title": "NodeState", + "type": "object", + "properties": { + "modified": { + "title": "Modified", + "description": "true if the node's outputs need to be re-computed", + "default": true, + "type": "boolean" + }, + "dependencies": { + "title": "Dependencies", + "description": "contains the node inputs dependencies if they need to be computed first", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "uniqueItems": true + }, + "currentStatus": { + "description": "the node's current state", + "default": "NOT_STARTED", + "allOf": [ + { + "title": "RunningState", + "description": "State of execution of a project's computational workflow\n\nSEE StateType for task state", + "enum": [ + "UNKNOWN", + "PUBLISHED", + "NOT_STARTED", + "PENDING", + "STARTED", + "RETRY", + "SUCCESS", + "FAILED", + "ABORTED" + ], + "type": "string" + } + ] + } + }, + "additionalProperties": false, + "examples": [ + { + "modified": true, + "dependencies": [], + "currentStatus": "NOT_STARTED" + }, + { + "modified": true, + "dependencies": [ + "42838344-03de-4ce2-8d93-589a5dcdfd05" + ], + "currentStatus": "ABORTED" + }, + { + "modified": false, + "dependencies": [], + "currentStatus": "SUCCESS" + } + ] + }, + "Node": { + "title": "Node", + "type": "object", + "properties": { + "key": { + "title": "Key", + "description": "distinctive name for the node based on the docker registry path", + "examples": [ + "simcore/services/comp/itis/sleeper", + "simcore/services/dynamic/3dviewer", + "simcore/services/frontend/file-picker" + ], + "pattern": "^(simcore)/(services)/(comp|dynamic|frontend)(/[\\w/-]+)+$", + "type": "string" + }, + "version": { + "title": "Version", + "description": "semantic version number of the node", + "examples": [ + "1.0.0", + "0.0.1" + ], + "pattern": "^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){2}(-(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*)(\\.(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*))*)?(\\+[-\\da-zA-Z]+(\\.[-\\da-zA-Z-]+)*)?$", + "type": "string" + }, + "label": { + "title": "Label", + "description": "The short name of the node", + "examples": [ + "JupyterLab" + ], + "type": "string" + }, + "progress": { + "title": "Progress", + "description": "the node progress value", + "minimum": 0, + "maximum": 100, + "type": "number" + }, + "thumbnail": { + "title": "Thumbnail", + "description": "url of the latest screenshot of the node", + "examples": [ + "https://placeimg.com/171/96/tech/grayscale/?0.jpg" + ], + "minLength": 0, + "maxLength": 2083, + "format": "uri", + "type": "string" + }, + "runHash": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "Runhash", + "description": "the hex digest of the resolved inputs +outputs hash at the time when the last outputs were generated", + "type": "string" + } + ] + }, + "inputs": { + "title": "Inputs", + "description": "values of input properties", + "type": "object", + "patternProperties": { + "^[-_a-zA-Z0-9]+$": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "string", + "format": "json-string" + }, + { + "type": "string" + }, + { + "title": "PortLink", + "description": "I/O port type to reference to an output port of another node in the same project", + "type": "object", + "properties": { + "nodeUuid": { + "title": "Nodeuuid", + "description": "The node to get the port output from", + "type": "string", + "format": "uuid" + }, + "output": { + "title": "Output", + "description": "The port key in the node given by nodeUuid", + "pattern": "^[-_a-zA-Z0-9]+$", + "type": "string" + } + }, + "required": [ + "nodeUuid", + "output" + ], + "additionalProperties": false, + "examples": [ + { + "nodeUuid": "da5068e0-8a8d-4fb9-9516-56e5ddaef15b", + "output": "out_2" + } + ] + }, + { + "title": "SimCoreFileLink", + "description": "I/O port type to hold a link to a file in simcore S3 storage", + "type": "object", + "properties": { + "store": { + "title": "Store", + "description": "The store identifier: 0 for simcore S3, 1 for datcore", + "type": "integer" + }, + "path": { + "title": "Path", + "description": "The path to the file in the storage provider domain", + "anyOf": [ + { + "type": "string", + "pattern": "^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\\/(.+)$" + }, + { + "type": "string", + "pattern": "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + } + ] + }, + "label": { + "title": "Label", + "description": "The real file name", + "type": "string" + }, + "eTag": { + "title": "Etag", + "description": "Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box).", + "type": "string" + }, + "dataset": { + "title": "Dataset", + "deprecated": true, + "type": "string" + } + }, + "required": [ + "store", + "path" + ], + "additionalProperties": false, + "examples": [ + { + "store": 0, + "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt", + "eTag": "859fda0cb82fc4acb4686510a172d9a9-1", + "label": "input.txt" + }, + { + "store": "0", + "path": "50339632-ee1d-11ec-a0c2-02420a0194e4/23b1522f-225f-5a4c-9158-c4c19a70d4a8/output.h5", + "eTag": "f7e4c7076761a42a871e978c8691c676" + }, + { + "store": 0, + "path": "api/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt" + }, + { + "store": 0, + "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/d4442ca4-23fd-5b6b-ba6d-0b75f711c109/y_1D.txt" + } + ] + }, + { + "title": "DatCoreFileLink", + "description": "I/O port type to hold a link to a file in DATCORE storage", + "type": "object", + "properties": { + "store": { + "title": "Store", + "description": "The store identifier: 0 for simcore S3, 1 for datcore", + "type": "integer" + }, + "path": { + "title": "Path", + "description": "The path to the file in the storage provider domain", + "anyOf": [ + { + "type": "string", + "pattern": "^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\\/(.+)$" + }, + { + "type": "string", + "pattern": "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + } + ] + }, + "label": { + "title": "Label", + "description": "The real file name", + "type": "string" + }, + "eTag": { + "title": "Etag", + "description": "Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box).", + "type": "string" + }, + "dataset": { + "title": "Dataset", + "description": "Unique identifier to access the dataset on datcore (REQUIRED for datcore)", + "type": "string" + } + }, + "required": [ + "store", + "path", + "label", + "dataset" + ], + "additionalProperties": false, + "examples": [ + { + "store": 1, + "dataset": "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4", + "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", + "label": "initial_WTstates" + }, + { + "store": 1, + "dataset": "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4", + "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", + "label": "initial_WTstates" + } + ] + }, + { + "title": "DownloadLink", + "description": "I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)", + "type": "object", + "properties": { + "downloadLink": { + "title": "Downloadlink", + "minLength": 1, + "maxLength": 65536, + "format": "uri", + "type": "string" + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "downloadLink" + ], + "additionalProperties": false, + "examples": [ + { + "downloadLink": "https://fakeimg.pl/250x100/" + } + ] + }, + { + "type": "array", + "items": {} + }, + { + "type": "object" + } + ] + } + } + }, + "inputsUnits": { + "title": "Inputsunits", + "description": "Overrides default unit (if any) defined in the service for each port", + "type": "object", + "patternProperties": { + "^[-_a-zA-Z0-9]+$": { + "type": "string" + } + } + }, + "inputAccess": { + "description": "map with key - access level pairs", + "type": "object", + "patternProperties": { + "^[-_a-zA-Z0-9]+$": { + "title": "AccessEnum", + "description": "An enumeration.", + "enum": [ + "ReadAndWrite", + "Invisible", + "ReadOnly" + ], + "type": "string" + } + } + }, + "inputNodes": { + "title": "Inputnodes", + "description": "node IDs of where the node is connected to", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "outputs": { + "title": "Outputs", + "description": "values of output properties", + "type": "object", + "patternProperties": { + "^[-_a-zA-Z0-9]+$": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "string", + "format": "json-string" + }, + { + "type": "string" + }, + { + "title": "SimCoreFileLink", + "description": "I/O port type to hold a link to a file in simcore S3 storage", + "type": "object", + "properties": { + "store": { + "title": "Store", + "description": "The store identifier: 0 for simcore S3, 1 for datcore", + "type": "integer" + }, + "path": { + "title": "Path", + "description": "The path to the file in the storage provider domain", + "anyOf": [ + { + "type": "string", + "pattern": "^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\\/(.+)$" + }, + { + "type": "string", + "pattern": "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + } + ] + }, + "label": { + "title": "Label", + "description": "The real file name", + "type": "string" + }, + "eTag": { + "title": "Etag", + "description": "Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box).", + "type": "string" + }, + "dataset": { + "title": "Dataset", + "deprecated": true, + "type": "string" + } + }, + "required": [ + "store", + "path" + ], + "additionalProperties": false, + "examples": [ + { + "store": 0, + "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt", + "eTag": "859fda0cb82fc4acb4686510a172d9a9-1", + "label": "input.txt" + }, + { + "store": "0", + "path": "50339632-ee1d-11ec-a0c2-02420a0194e4/23b1522f-225f-5a4c-9158-c4c19a70d4a8/output.h5", + "eTag": "f7e4c7076761a42a871e978c8691c676" + }, + { + "store": 0, + "path": "api/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt" + }, + { + "store": 0, + "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/d4442ca4-23fd-5b6b-ba6d-0b75f711c109/y_1D.txt" + } + ] + }, + { + "title": "DatCoreFileLink", + "description": "I/O port type to hold a link to a file in DATCORE storage", + "type": "object", + "properties": { + "store": { + "title": "Store", + "description": "The store identifier: 0 for simcore S3, 1 for datcore", + "type": "integer" + }, + "path": { + "title": "Path", + "description": "The path to the file in the storage provider domain", + "anyOf": [ + { + "type": "string", + "pattern": "^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\\/(.+)$" + }, + { + "type": "string", + "pattern": "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + } + ] + }, + "label": { + "title": "Label", + "description": "The real file name", + "type": "string" + }, + "eTag": { + "title": "Etag", + "description": "Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box).", + "type": "string" + }, + "dataset": { + "title": "Dataset", + "description": "Unique identifier to access the dataset on datcore (REQUIRED for datcore)", + "type": "string" + } + }, + "required": [ + "store", + "path", + "label", + "dataset" + ], + "additionalProperties": false, + "examples": [ + { + "store": 1, + "dataset": "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4", + "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", + "label": "initial_WTstates" + }, + { + "store": 1, + "dataset": "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4", + "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", + "label": "initial_WTstates" + } + ] + }, + { + "title": "DownloadLink", + "description": "I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)", + "type": "object", + "properties": { + "downloadLink": { + "title": "Downloadlink", + "minLength": 1, + "maxLength": 65536, + "format": "uri", + "type": "string" + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "downloadLink" + ], + "additionalProperties": false, + "examples": [ + { + "downloadLink": "https://fakeimg.pl/250x100/" + } + ] + }, + { + "type": "array", + "items": {} + }, + { + "type": "object" + } + ] + } + } + }, + "outputNode": { + "title": "Outputnode", + "deprecated": true, + "type": "boolean" + }, + "outputNodes": { + "title": "Outputnodes", + "description": "Used in group-nodes. Node IDs of those connected to the output", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "parent": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "Parent", + "description": "Parent's (group-nodes') node ID s. Used to group", + "type": "string", + "format": "uuid" + } + ] + }, + "position": { + "title": "Position", + "description": "Use projects_ui.WorkbenchUI.position instead", + "deprecated": true, + "allOf": [ + { + "title": "Position", + "type": "object", + "properties": { + "x": { + "title": "X", + "description": "The x position", + "example": [ + "12" + ], + "type": "integer" + }, + "y": { + "title": "Y", + "description": "The y position", + "example": [ + "15" + ], + "type": "integer" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + ] + }, + "state": { + "title": "State", + "description": "The node's state object", + "allOf": [ + { + "title": "NodeState", + "type": "object", + "properties": { + "modified": { + "title": "Modified", + "description": "true if the node's outputs need to be re-computed", + "default": true, + "type": "boolean" + }, + "dependencies": { + "title": "Dependencies", + "description": "contains the node inputs dependencies if they need to be computed first", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "uniqueItems": true + }, + "currentStatus": { + "description": "the node's current state", + "default": "NOT_STARTED", + "allOf": [ + { + "title": "RunningState", + "description": "State of execution of a project's computational workflow\n\nSEE StateType for task state", + "enum": [ + "UNKNOWN", + "PUBLISHED", + "NOT_STARTED", + "PENDING", + "STARTED", + "RETRY", + "SUCCESS", + "FAILED", + "ABORTED" + ], + "type": "string" + } + ] + } + }, + "additionalProperties": false, + "examples": [ + { + "modified": true, + "dependencies": [], + "currentStatus": "NOT_STARTED" + }, + { + "modified": true, + "dependencies": [ + "42838344-03de-4ce2-8d93-589a5dcdfd05" + ], + "currentStatus": "ABORTED" + }, + { + "modified": false, + "dependencies": [], + "currentStatus": "SUCCESS" + } + ] + } + ] + }, + "bootOptions": { + "title": "Bootoptions", + "description": "Some services provide alternative parameters to be injected at boot time. The user selection should be stored here, and it will overwrite the services's defaults.", + "type": "object", + "patternProperties": { + "[a-zA-Z][a-azA-Z0-9_]*": { + "type": "string" + } + } + } + }, + "required": [ + "key", + "version", + "label" + ], + "additionalProperties": false + }, + "AccessRights": { + "title": "AccessRights", + "type": "object", + "properties": { + "read": { + "title": "Read", + "description": "gives read access", + "type": "boolean" + }, + "write": { + "title": "Write", + "description": "gives write access", + "type": "boolean" + }, + "delete": { + "title": "Delete", + "description": "gives deletion rights", + "type": "boolean" + } + }, + "required": [ + "read", + "write", + "delete" + ], + "additionalProperties": false + }, + "Owner": { + "title": "Owner", + "type": "object", + "properties": { + "user_id": { + "title": "User Id", + "description": "Owner's identifier when registered in the user's database table", + "examples": [ + 2 + ], + "type": "integer" + }, + "first_name": { + "title": "First Name", + "description": "Owner first name", + "examples": [ + "John" + ], + "type": "string" + }, + "last_name": { + "title": "Last Name", + "description": "Owner last name", + "examples": [ + "Smith" + ], + "type": "string" + } + }, + "required": [ + "user_id", + "first_name", + "last_name" + ], + "additionalProperties": false + }, + "ProjectStatus": { + "title": "ProjectStatus", + "description": "An enumeration.", + "enum": [ + "CLOSED", + "CLOSING", + "CLONING", + "EXPORTING", + "OPENING", + "OPENED" + ], + "type": "string" + }, + "ProjectLocked": { + "title": "ProjectLocked", + "type": "object", + "properties": { + "value": { + "title": "Value", + "description": "True if the project is locked", + "type": "boolean" + }, + "owner": { + "title": "Owner", + "description": "If locked, the user that owns the lock", + "allOf": [ + { + "title": "Owner", + "type": "object", + "properties": { + "user_id": { + "title": "User Id", + "description": "Owner's identifier when registered in the user's database table", + "examples": [ + 2 + ], + "type": "integer" + }, + "first_name": { + "title": "First Name", + "description": "Owner first name", + "examples": [ + "John" + ], + "type": "string" + }, + "last_name": { + "title": "Last Name", + "description": "Owner last name", + "examples": [ + "Smith" + ], + "type": "string" + } + }, + "required": [ + "user_id", + "first_name", + "last_name" + ], + "additionalProperties": false + } + ] + }, + "status": { + "description": "The status of the project", + "allOf": [ + { + "title": "ProjectStatus", + "description": "An enumeration.", + "enum": [ + "CLOSED", + "CLOSING", + "CLONING", + "EXPORTING", + "OPENING", + "OPENED" + ], + "type": "string" + } + ] + } + }, + "required": [ + "value", + "status" + ], + "additionalProperties": false, + "examples": [ + { + "value": false, + "status": "CLOSED" + }, + { + "value": true, + "status": "OPENED", + "owner": { + "user_id": 123, + "first_name": "Johnny", + "last_name": "Cash" + } + } + ] + }, + "ProjectRunningState": { + "title": "ProjectRunningState", + "type": "object", + "properties": { + "value": { + "description": "The running state of the project", + "examples": [ + "STARTED" + ], + "allOf": [ + { + "title": "RunningState", + "description": "State of execution of a project's computational workflow\n\nSEE StateType for task state", + "enum": [ + "UNKNOWN", + "PUBLISHED", + "NOT_STARTED", + "PENDING", + "STARTED", + "RETRY", + "SUCCESS", + "FAILED", + "ABORTED" + ], + "type": "string" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "ProjectState": { + "title": "ProjectState", + "type": "object", + "properties": { + "locked": { + "title": "Locked", + "description": "The project lock state", + "allOf": [ + { + "title": "ProjectLocked", + "type": "object", + "properties": { + "value": { + "title": "Value", + "description": "True if the project is locked", + "type": "boolean" + }, + "owner": { + "title": "Owner", + "description": "If locked, the user that owns the lock", + "allOf": [ + { + "title": "Owner", + "type": "object", + "properties": { + "user_id": { + "title": "User Id", + "description": "Owner's identifier when registered in the user's database table", + "examples": [ + 2 + ], + "type": "integer" + }, + "first_name": { + "title": "First Name", + "description": "Owner first name", + "examples": [ + "John" + ], + "type": "string" + }, + "last_name": { + "title": "Last Name", + "description": "Owner last name", + "examples": [ + "Smith" + ], + "type": "string" + } + }, + "required": [ + "user_id", + "first_name", + "last_name" + ], + "additionalProperties": false + } + ] + }, + "status": { + "description": "The status of the project", + "allOf": [ + { + "title": "ProjectStatus", + "description": "An enumeration.", + "enum": [ + "CLOSED", + "CLOSING", + "CLONING", + "EXPORTING", + "OPENING", + "OPENED" + ], + "type": "string" + } + ] + } + }, + "required": [ + "value", + "status" + ], + "additionalProperties": false, + "examples": [ + { + "value": false, + "status": "CLOSED" + }, + { + "value": true, + "status": "OPENED", + "owner": { + "user_id": 123, + "first_name": "Johnny", + "last_name": "Cash" + } + } + ] + } + ] + }, + "state": { + "title": "State", + "description": "The project running state", + "allOf": [ + { + "title": "ProjectRunningState", + "type": "object", + "properties": { + "value": { + "description": "The running state of the project", + "examples": [ + "STARTED" + ], + "allOf": [ + { + "title": "RunningState", + "description": "State of execution of a project's computational workflow\n\nSEE StateType for task state", + "enum": [ + "UNKNOWN", + "PUBLISHED", + "NOT_STARTED", + "PENDING", + "STARTED", + "RETRY", + "SUCCESS", + "FAILED", + "ABORTED" + ], + "type": "string" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "locked", + "state" + ], + "additionalProperties": false + }, + "Marker": { + "title": "Marker", + "type": "object", + "properties": { + "color": { + "title": "Color", + "type": "string", + "format": "color" + } + }, + "required": [ + "color" + ], + "additionalProperties": false + }, + "WorkbenchUI": { + "title": "WorkbenchUI", + "type": "object", + "properties": { + "position": { + "title": "Position", + "description": "The node position in the workbench", + "allOf": [ + { + "title": "Position", + "type": "object", + "properties": { + "x": { + "title": "X", + "description": "The x position", + "example": [ + "12" + ], + "type": "integer" + }, + "y": { + "title": "Y", + "description": "The y position", + "example": [ + "15" + ], + "type": "integer" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + ] + }, + "marker": { + "title": "Marker", + "type": "object", + "properties": { + "color": { + "title": "Color", + "type": "string", + "format": "color" + } + }, + "required": [ + "color" + ], + "additionalProperties": false + } + }, + "required": [ + "position" + ], + "additionalProperties": false + }, + "Slideshow": { + "title": "Slideshow", + "type": "object", + "properties": { + "position": { + "title": "Position", + "type": "integer" + }, + "instructions": { + "title": "Instructions", + "type": "string" + } + }, + "required": [ + "position" + ] + }, + "Annotation": { + "title": "Annotation", + "type": "object", + "properties": { + "type": { + "title": "Type", + "enum": [ + "rect", + "text" + ], + "type": "string" + }, + "color": { + "title": "Color", + "type": "string", + "format": "color" + }, + "attributes": { + "title": "Attributes", + "description": "svg attributes", + "type": "object" + } + }, + "required": [ + "type", + "color", + "attributes" + ], + "additionalProperties": false, + "examples": [ + { + "type": "rect", + "color": "#FF0000", + "attributes": { + "x": 415, + "y": 100, + "width": 117, + "height": 26 + } + }, + { + "type": "text", + "color": "#0000FF", + "attributes": { + "x": 415, + "y": 100, + "text": "Hey!" + } + } + ] + }, + "StudyUI": { + "title": "StudyUI", + "type": "object", + "properties": { + "workbench": { + "title": "Workbench", + "type": "object", + "patternProperties": { + "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$": { + "title": "WorkbenchUI", + "type": "object", + "properties": { + "position": { + "title": "Position", + "description": "The node position in the workbench", + "allOf": [ + { + "title": "Position", + "type": "object", + "properties": { + "x": { + "title": "X", + "description": "The x position", + "example": [ + "12" + ], + "type": "integer" + }, + "y": { + "title": "Y", + "description": "The y position", + "example": [ + "15" + ], + "type": "integer" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + ] + }, + "marker": { + "title": "Marker", + "type": "object", + "properties": { + "color": { + "title": "Color", + "type": "string", + "format": "color" + } + }, + "required": [ + "color" + ], + "additionalProperties": false + } + }, + "required": [ + "position" + ], + "additionalProperties": false + } + } + }, + "slideshow": { + "title": "Slideshow", + "type": "object", + "patternProperties": { + "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$": { + "title": "Slideshow", + "type": "object", + "properties": { + "position": { + "title": "Position", + "type": "integer" + }, + "instructions": { + "title": "Instructions", + "type": "string" + } + }, + "required": [ + "position" + ] + } + } + }, + "currentNodeId": { + "title": "Currentnodeid", + "type": "string", + "format": "uuid" + }, + "annotations": { + "title": "Annotations", + "type": "object", + "patternProperties": { + "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$": { + "title": "Annotation", + "type": "object", + "properties": { + "type": { + "title": "Type", + "enum": [ + "rect", + "text" + ], + "type": "string" + }, + "color": { + "title": "Color", + "type": "string", + "format": "color" + }, + "attributes": { + "title": "Attributes", + "description": "svg attributes", + "type": "object" + } + }, + "required": [ + "type", + "color", + "attributes" + ], + "additionalProperties": false, + "examples": [ + { + "type": "rect", + "color": "#FF0000", + "attributes": { + "x": 415, + "y": 100, + "width": 117, + "height": 26 + } + }, + { + "type": "text", + "color": "#0000FF", + "attributes": { + "x": 415, + "y": 100, + "text": "Hey!" + } + } + ] + } + } + } + } + } + } +} diff --git a/services/storage/src/simcore_service_storage/api/v0/schemas/project-v0.0.1.json b/services/storage/src/simcore_service_storage/api/v0/schemas/project-v0.0.1.json deleted file mode 100644 index 8c178845ccb..00000000000 --- a/services/storage/src/simcore_service_storage/api/v0/schemas/project-v0.0.1.json +++ /dev/null @@ -1,768 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://simcore.io/api/specs/webserver/v0/components/schemas/project-v0.0.1.json", - "title": "simcore project", - "description": "Description of a simcore project", - "type": "object", - "additionalProperties": false, - "required": [ - "uuid", - "name", - "description", - "prjOwner", - "accessRights", - "creationDate", - "lastChangeDate", - "thumbnail", - "workbench" - ], - "properties": { - "uuid": { - "type": "string", - "format": "uuid", - "description": "project unique identifier", - "examples": [ - "07640335-a91f-468c-ab69-a374fa82078d", - "9bcf8feb-c1b1-41b6-b201-639cd6ccdba8" - ] - }, - "name": { - "type": "string", - "description": "project name", - "examples": [ - "Temporal Distortion Simulator" - ] - }, - "description": { - "type": "string", - "description": "longer one-line description about the project", - "examples": [ - "Dabbling in temporal transitions ..." - ] - }, - "prjOwner": { - "type": "string", - "format": "email", - "description": "user email" - }, - "accessRights": { - "type": "object", - "description": "object containing the GroupID as key and read/write/execution permissions as value", - "patternProperties": { - "^\\S+$": { - "type": "object", - "description": "the group id", - "additionalProperties": false, - "required": [ - "read", - "write", - "delete" - ], - "properties": { - "read": { - "type": "boolean", - "description": "gives read access" - }, - "write": { - "type": "boolean", - "description": "gives write access" - }, - "delete": { - "type": "boolean", - "description": "gives deletion rights" - } - } - } - } - }, - "creationDate": { - "type": "string", - "description": "project creation date", - "pattern": "\\d{4}-(12|11|10|0?[1-9])-(31|30|[0-2]?\\d)T(2[0-3]|1\\d|0?[0-9])(:(\\d|[0-5]\\d)){2}(\\.\\d{3})?Z", - "examples": [ - "2018-07-01T11:13:43Z" - ] - }, - "lastChangeDate": { - "type": "string", - "description": "last save date", - "pattern": "\\d{4}-(12|11|10|0?[1-9])-(31|30|[0-2]?\\d)T(2[0-3]|1\\d|0?[0-9])(:(\\d|[0-5]\\d)){2}(\\.\\d{3})?Z", - "examples": [ - "2018-07-01T11:13:43Z" - ] - }, - "thumbnail": { - "type": "string", - "minLength": 0, - "maxLength": 2083, - "format": "uri", - "description": "url of the latest screenshot of the project", - "examples": [ - "https://placeimg.com/171/96/tech/grayscale/?0.jpg" - ] - }, - "workbench": { - "type": "object", - "patternProperties": { - "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?4[0-9a-fA-F]{3}-?[89abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$": { - "type": "object", - "additionalProperties": false, - "required": [ - "key", - "version", - "label" - ], - "properties": { - "key": { - "type": "string", - "description": "distinctive name for the node based on the docker registry path", - "pattern": "^(simcore)/(services)/(comp|dynamic|frontend)(/[\\w/-]+)+$", - "examples": [ - "simcore/services/comp/sleeper", - "simcore/services/dynamic/3dviewer", - "simcore/services/frontend/file-picker" - ] - }, - "version": { - "type": "string", - "description": "semantic version number of the node", - "pattern": "^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){2}(-(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*)(\\.(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*))*)?(\\+[-\\da-zA-Z]+(\\.[-\\da-zA-Z-]+)*)?$", - "examples": [ - "1.0.0", - "0.0.1" - ] - }, - "label": { - "type": "string", - "description": "The short name of the node", - "example": [ - "JupyterLab" - ] - }, - "progress": { - "type": "number", - "maximum": 100, - "minimum": 0, - "description": "the node progress value" - }, - "thumbnail": { - "minLength": 0, - "maxLength": 2083, - "format": "uri", - "type": "string", - "description": "url of the latest screenshot of the node", - "examples": [ - "https://placeimg.com/171/96/tech/grayscale/?0.jpg" - ] - }, - "runHash": { - "description": "the hex digest of the resolved inputs +outputs hash at the time when the last outputs were generated", - "type": [ - "string", - "null" - ], - "examples": [ - "a4337bc45a8fc544c03f52dc550cd6e1e87021bc896588bd79e901e2" - ] - }, - "inputs": { - "type": "object", - "description": "values of input properties", - "patternProperties": { - "^[-_a-zA-Z0-9]+$": { - "oneOf": [ - { - "type": [ - "integer", - "boolean", - "string", - "number", - "null" - ] - }, - { - "type": "object", - "additionalProperties": false, - "required": [ - "nodeUuid", - "output" - ], - "properties": { - "nodeUuid": { - "type": "string", - "format": "uuid" - }, - "output": { - "type": "string", - "pattern": "^[-_a-zA-Z0-9]+$" - } - } - }, - { - "type": "object", - "additionalProperties": false, - "required": [ - "store", - "path" - ], - "properties": { - "store": { - "type": [ - "string", - "integer" - ] - }, - "dataset": { - "type": "string" - }, - "path": { - "type": "string" - }, - "label": { - "type": "string" - }, - "eTag": { - "type": "string" - } - } - }, - { - "type": "object", - "additionalProperties": false, - "required": [ - "downloadLink" - ], - "properties": { - "downloadLink": { - "minLength": 1, - "maxLength": 65536, - "type": "string", - "format": "uri" - }, - "label": { - "type": "string" - } - } - }, - { - "type": "array", - "items": {} - } - ] - } - } - }, - "inputsUnits": { - "type": "object", - "description": "values of input unit", - "patternProperties": { - "^[-_a-zA-Z0-9]+$": { - "type": "string", - "examples": [ - "kilo-meter", - "milli-second", - "micro-gram", - "kelvin" - ] - } - } - }, - "inputAccess": { - "description": "map with key - access level pairs", - "type": "object", - "patternProperties": { - "^[-_a-zA-Z0-9]+$": { - "type": "string", - "enum": [ - "Invisible", - "ReadOnly", - "ReadAndWrite" - ], - "default": "ReadAndWrite", - "examples": [ - "ReadOnly" - ] - } - } - }, - "inputNodes": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "description": "node IDs of where the node is connected to", - "examples": [ - "nodeUuid1", - "nodeUuid2" - ] - }, - "outputs": { - "default": {}, - "type": "object", - "patternProperties": { - "^[-_a-zA-Z0-9]+$": { - "oneOf": [ - { - "type": [ - "integer", - "boolean", - "string", - "number", - "null" - ] - }, - { - "type": "object", - "additionalProperties": false, - "required": [ - "store", - "path" - ], - "properties": { - "store": { - "type": [ - "string", - "integer" - ] - }, - "dataset": { - "type": "string" - }, - "path": { - "type": "string" - }, - "label": { - "type": "string" - }, - "eTag": { - "type": "string" - } - } - }, - { - "type": "object", - "additionalProperties": false, - "required": [ - "downloadLink" - ], - "properties": { - "downloadLink": { - "minLength": 1, - "maxLength": 65536, - "type": "string", - "format": "uri" - }, - "label": { - "type": "string" - } - } - }, - { - "type": "array", - "items": {} - } - ] - } - } - }, - "outputNode": { - "type": "boolean", - "deprecated": true - }, - "outputNodes": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "description": "Used in group-nodes. Node IDs of those connected to the output", - "examples": [ - "nodeUuid1", - "nodeUuid2" - ] - }, - "parent": { - "type": [ - "null", - "string" - ], - "format": "uuid", - "description": "Parent's (group-nodes') node ID s.", - "examples": [ - "nodeUuid1", - "nodeUuid2" - ] - }, - "position": { - "type": "object", - "additionalProperties": false, - "required": [ - "x", - "y" - ], - "properties": { - "x": { - "type": "integer", - "description": "The x position", - "example": [ - "12" - ] - }, - "y": { - "type": "integer", - "description": "The y position", - "example": [ - "15" - ] - } - }, - "deprecated": true - }, - "state": { - "title": "NodeState", - "type": "object", - "properties": { - "modified": { - "title": "Modified", - "description": "true if the node's outputs need to be re-computed", - "default": true, - "type": "boolean" - }, - "dependencies": { - "title": "Dependencies", - "description": "contains the node inputs dependencies if they need to be computed first", - "type": "array", - "uniqueItems": true, - "items": { - "type": "string", - "format": "uuid" - } - }, - "currentStatus": { - "description": "the node's current state", - "default": "NOT_STARTED", - "examples": [ - "RUNNING", - "FAILED" - ], - "enum": [ - "UNKNOWN", - "PUBLISHED", - "NOT_STARTED", - "PENDING", - "STARTED", - "RETRY", - "SUCCESS", - "FAILED", - "ABORTED" - ], - "type": "string" - } - }, - "additionalProperties": false - }, - "bootOptions": { - "title": "Boot Options", - "description": "Some services provide alternative parameters to be injected at boot time. The user selection should be stored here, and it will overwrite the services's defaults.", - "type": "object", - "patternProperties": { - "[a-zA-Z][a-azA-Z0-9_]*": { - "type": "string" - } - } - } - } - } - } - }, - "ui": { - "type": "object", - "additionalProperties": true, - "properties": { - "workbench": { - "type": "object", - "patternProperties": { - "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?4[0-9a-fA-F]{3}-?[89abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$": { - "type": "object", - "additionalProperties": false, - "required": [ - "position" - ], - "properties": { - "position": { - "type": "object", - "additionalProperties": false, - "required": [ - "x", - "y" - ], - "properties": { - "x": { - "type": "integer", - "description": "The x position", - "example": [ - "12" - ] - }, - "y": { - "type": "integer", - "description": "The y position", - "example": [ - "15" - ] - } - } - }, - "marker": { - "type": "object", - "additionalProperties": false, - "required": [ - "color" - ], - "properties": { - "color": { - "type": "string", - "description": "Marker's color", - "examples": [ - "#FF0000", - "#0000FF" - ] - } - } - } - } - } - } - }, - "slideshow": { - "type": "object", - "patternProperties": { - "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?4[0-9a-fA-F]{3}-?[89abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$": { - "type": "object", - "additionalProperties": false, - "required": [ - "position" - ], - "properties": { - "position": { - "type": "integer", - "description": "Slide's position", - "examples": [ - 0, - 2 - ] - }, - "instructions": { - "type": [ - "string", - "null" - ], - "description": "Instructions about what to do in this step", - "examples": [ - "This is a **sleeper**", - "Please, select the config file defined [in this link](asdf)" - ] - } - } - } - } - }, - "currentNodeId": { - "type": "string", - "format": "uuid" - }, - "annotations": { - "type": "object", - "patternProperties": { - "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?4[0-9a-fA-F]{3}-?[89abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$": { - "type": "object", - "additionalProperties": false, - "required": [ - "type", - "color", - "attributes" - ], - "properties": { - "type": { - "type": "string", - "description": "Annotation type", - "examples": [ - "rect", - "text" - ] - }, - "color": { - "type": "string", - "description": "Annotation's color", - "examples": [ - "#FF0000", - "#0000FF" - ] - }, - "attributes": { - "type": "object", - "description": "svg attributes" - } - } - } - } - } - } - }, - "tags": { - "type": "array", - "items": { - "type": "integer" - } - }, - "classifiers": { - "type": "array", - "description": "Contains the reference to the project classifiers", - "examples": [ - "some:id:to:a:classifier" - ], - "items": { - "type": "string" - } - }, - "dev": { - "type": "object", - "description": "object used for development purposes only" - }, - "state": { - "title": "State", - "description": "Project state", - "anyOf": [ - { - "type": "null" - }, - { - "title": "ProjectState", - "type": "object", - "additionalProperties": false, - "properties": { - "locked": { - "title": "Locked", - "description": "The project lock state", - "allOf": [ - { - "title": "ProjectLocked", - "type": "object", - "additionalProperties": false, - "properties": { - "value": { - "title": "Value", - "description": "True if the project is locked", - "type": "boolean" - }, - "owner": { - "title": "Owner", - "description": "If locked, the user that owns the lock", - "allOf": [ - { - "title": "Owner", - "type": "object", - "additionalProperties": false, - "properties": { - "user_id": { - "title": "User Id", - "type": "integer", - "description": "Owner's identifier when registered in the user's database table", - "example": [ - 2 - ] - }, - "first_name": { - "title": "First Name", - "description": "Owner first name", - "example": [ - "John" - ], - "type": "string" - }, - "last_name": { - "title": "Last Name", - "description": "Owner last name", - "example": [ - "Smith" - ], - "type": "string" - } - }, - "required": [ - "user_id", - "first_name", - "last_name" - ] - } - ] - }, - "status": { - "title": "Status", - "description": "The status of the project", - "enum": [ - "CLOSED", - "CLOSING", - "CLONING", - "OPENING", - "EXPORTING", - "OPENED" - ], - "type": "string" - } - }, - "required": [ - "value", - "status" - ] - } - ] - }, - "state": { - "title": "State", - "description": "The project running state", - "allOf": [ - { - "title": "ProjectRunningState", - "type": "object", - "additionalProperties": false, - "properties": { - "value": { - "title": "RunningState", - "description": "An enumeration.", - "enum": [ - "UNKNOWN", - "NOT_STARTED", - "PUBLISHED", - "PENDING", - "STARTED", - "RETRY", - "SUCCESS", - "FAILED", - "ABORTED" - ], - "type": "string" - } - }, - "required": [ - "value" - ] - } - ] - } - }, - "required": [ - "locked", - "state" - ] - } - ] - }, - "quality": { - "type": "object", - "title": "Quality", - "description": "Object containing Quality Assessment related data" - } - } -} diff --git a/services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml b/services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml index a4a48f07085..a23d52bb0cd 100644 --- a/services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml +++ b/services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml @@ -2419,550 +2419,770 @@ paths: content: application/json: schema: - title: simcore project - description: Description of a simcore project - type: object additionalProperties: false - required: - - uuid - - name - - description - - prjOwner - - accessRights - - creationDate - - lastChangeDate - - thumbnail - - workbench properties: - uuid: - type: string - format: uuid - description: project unique identifier - example: 07640335-a91f-468c-ab69-a374fa82078d - name: - type: string - description: project name - example: Temporal Distortion Simulator - description: - type: string - description: longer one-line description about the project - example: Dabbling in temporal transitions ... - prjOwner: - type: string - format: email - description: user email accessRights: - type: object + additionalProperties: true description: object containing the GroupID as key and read/write/execution permissions as value + title: Accessrights + type: object x-patternProperties: ^\S+$: - type: object - description: the group id additionalProperties: false - required: - - read - - write - - delete properties: - read: + delete: + description: gives deletion rights + title: Delete type: boolean + read: description: gives read access - write: + title: Read type: boolean + write: description: gives write access - delete: + title: Write type: boolean - description: gives deletion rights - additionalProperties: true + required: + - read + - write + - delete + title: AccessRights + type: object + classifiers: + description: Contains the reference to the project classifiers + example: 'some:id:to:a:classifier' + items: + type: string + title: Classifiers + type: array creationDate: - type: string description: project creation date - pattern: '\d{4}-(12|11|10|0?[1-9])-(31|30|[0-2]?\d)T(2[0-3]|1\d|0?[0-9])(:(\d|[0-5]\d)){2}(\.\d{3})?Z' example: '2018-07-01T11:13:43Z' - lastChangeDate: + pattern: '\d{4}-(12|11|10|0?[1-9])-(31|30|[0-2]?\d)T(2[0-3]|1\d|0?[0-9])(:(\d|[0-5]\d)){2}(\.\d{3})?Z' + title: Creationdate type: string + description: + description: longer one-line description about the project + example: Dabbling in temporal transitions ... + title: Description + type: string + dev: + description: object used for development purposes only + title: Dev + type: object + lastChangeDate: description: last save date - pattern: '\d{4}-(12|11|10|0?[1-9])-(31|30|[0-2]?\d)T(2[0-3]|1\d|0?[0-9])(:(\d|[0-5]\d)){2}(\.\d{3})?Z' example: '2018-07-01T11:13:43Z' - thumbnail: + pattern: '\d{4}-(12|11|10|0?[1-9])-(31|30|[0-2]?\d)T(2[0-3]|1\d|0?[0-9])(:(\d|[0-5]\d)){2}(\.\d{3})?Z' + title: Lastchangedate type: string - minLength: 0 - maxLength: 2083 - format: uri - description: url of the latest screenshot of the project + name: + description: project name + example: Temporal Distortion Simulator + title: Name + type: string + prjOwner: + description: user email + format: email + title: Prjowner + type: string + quality: + default: {} + description: stores the study quality assessment + title: Quality + type: object + state: + anyOf: + - nullable: true + - additionalProperties: false + properties: + locked: + allOf: + - additionalProperties: false + example: + status: CLOSED + value: false + properties: + owner: + allOf: + - additionalProperties: false + properties: + first_name: + description: Owner first name + example: John + title: First Name + type: string + last_name: + description: Owner last name + example: Smith + title: Last Name + type: string + user_id: + description: Owner's identifier when registered in the user's database table + example: 2 + title: User Id + type: integer + required: + - user_id + - first_name + - last_name + title: Owner + type: object + description: 'If locked, the user that owns the lock' + title: Owner + status: + allOf: + - description: An enumeration. + enum: + - CLOSED + - CLOSING + - CLONING + - EXPORTING + - OPENING + - OPENED + title: ProjectStatus + type: string + description: The status of the project + value: + description: True if the project is locked + title: Value + type: boolean + required: + - value + - status + title: ProjectLocked + type: object + description: The project lock state + title: Locked + state: + allOf: + - additionalProperties: false + properties: + value: + allOf: + - description: |- + State of execution of a project's computational workflow + + SEE StateType for task state + enum: + - UNKNOWN + - PUBLISHED + - NOT_STARTED + - PENDING + - STARTED + - RETRY + - SUCCESS + - FAILED + - ABORTED + title: RunningState + type: string + description: The running state of the project + example: STARTED + required: + - value + title: ProjectRunningState + type: object + description: The project running state + title: State + required: + - locked + - state + title: ProjectState + type: object + tags: + default: [] + items: + type: integer + title: Tags + type: array + thumbnail: + description: url of the project thumbnail example: 'https://placeimg.com/171/96/tech/grayscale/?0.jpg' + format: uri + maxLength: 2083 + minLength: 0 + title: Thumbnail + type: string + ui: + properties: + annotations: + additionalProperties: true + title: Annotations + type: object + x-patternProperties: + '^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$': + additionalProperties: false + example: + - attributes: + height: 26 + width: 117 + x: 415 + 'y': 100 + color: '#FF0000' + type: rect + - attributes: + text: Hey! + x: 415 + 'y': 100 + color: '#0000FF' + type: text + properties: + attributes: + description: svg attributes + title: Attributes + type: object + color: + format: color + title: Color + type: string + type: + enum: + - rect + - text + title: Type + type: string + required: + - type + - color + - attributes + title: Annotation + type: object + currentNodeId: + format: uuid + title: Currentnodeid + type: string + slideshow: + additionalProperties: true + title: Slideshow + type: object + x-patternProperties: + '^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$': + properties: + instructions: + title: Instructions + type: string + position: + title: Position + type: integer + required: + - position + title: Slideshow + type: object + workbench: + additionalProperties: true + title: Workbench + type: object + x-patternProperties: + '^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$': + additionalProperties: false + properties: + marker: + additionalProperties: false + properties: + color: + format: color + title: Color + type: string + required: + - color + title: Marker + type: object + position: + allOf: + - additionalProperties: false + properties: + x: + description: The x position + example: + - '12' + title: X + type: integer + 'y': + description: The y position + example: + - '15' + title: 'Y' + type: integer + required: + - x + - 'y' + title: Position + type: object + description: The node position in the workbench + title: Position + required: + - position + title: WorkbenchUI + type: object + title: StudyUI + type: object + uuid: + description: project unique identifier + example: 07640335-a91f-468c-ab69-a374fa82078d + format: uuid + title: Uuid + type: string workbench: + additionalProperties: true + description: Project's pipeline + title: Workbench type: object x-patternProperties: - '^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?4[0-9a-fA-F]{3}-?[89abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$': - type: object + '^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$': additionalProperties: false - required: - - key - - version - - label properties: - key: - type: string - description: distinctive name for the node based on the docker registry path - pattern: '^(simcore)/(services)/(comp|dynamic|frontend)(/[\w/-]+)+$' - example: - - simcore/services/comp/sleeper - - simcore/services/dynamic/3dviewer - - simcore/services/frontend/file-picker - version: - type: string - description: semantic version number of the node - pattern: '^(0|[1-9]\d*)(\.(0|[1-9]\d*)){2}(-(0|[1-9]\d*|\d*[-a-zA-Z][-\da-zA-Z]*)(\.(0|[1-9]\d*|\d*[-a-zA-Z][-\da-zA-Z]*))*)?(\+[-\da-zA-Z]+(\.[-\da-zA-Z-]+)*)?$' - example: - - 1.0.0 - - 0.0.1 - label: - type: string - description: The short name of the node - example: - - JupyterLab - progress: - type: number - maximum: 100 - minimum: 0 - description: the node progress value - thumbnail: - minLength: 0 - maxLength: 2083 - format: uri - type: string - description: url of the latest screenshot of the node - example: - - 'https://placeimg.com/171/96/tech/grayscale/?0.jpg' - runHash: - description: the hex digest of the resolved inputs +outputs hash at the time when the last outputs were generated - type: - - string - - 'null' - example: - - a4337bc45a8fc544c03f52dc550cd6e1e87021bc896588bd79e901e2 - inputs: + bootOptions: + description: 'Some services provide alternative parameters to be injected at boot time. The user selection should be stored here, and it will overwrite the services''s defaults.' + patternProperties: + '[a-zA-Z][a-azA-Z0-9_]*': + type: string + title: Bootoptions type: object + inputAccess: + description: map with key - access level pairs + patternProperties: + '^[-_a-zA-Z0-9]+$': + description: An enumeration. + enum: + - ReadAndWrite + - Invisible + - ReadOnly + title: AccessEnum + type: string + type: object + inputNodes: + description: node IDs of where the node is connected to + items: + format: uuid + type: string + title: Inputnodes + type: array + inputs: description: values of input properties patternProperties: '^[-_a-zA-Z0-9]+$': - oneOf: - - type: - - integer - - boolean - - string - - number - - 'null' - - type: object - additionalProperties: false + anyOf: + - type: boolean + - type: integer + - type: number + - format: json-string + type: string + - type: string + - additionalProperties: false + description: I/O port type to reference to an output port of another node in the same project + example: + - nodeUuid: da5068e0-8a8d-4fb9-9516-56e5ddaef15b + output: out_2 + properties: + nodeUuid: + description: The node to get the port output from + format: uuid + title: Nodeuuid + type: string + output: + description: The port key in the node given by nodeUuid + pattern: '^[-_a-zA-Z0-9]+$' + title: Output + type: string required: - nodeUuid - output + title: PortLink + type: object + - additionalProperties: false + description: I/O port type to hold a link to a file in simcore S3 storage + example: + - eTag: 859fda0cb82fc4acb4686510a172d9a9-1 + label: input.txt + path: 94453a6a-c8d4-52b3-a22d-ccbf81f8d636/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt + store: 0 + - eTag: f7e4c7076761a42a871e978c8691c676 + path: 50339632-ee1d-11ec-a0c2-02420a0194e4/23b1522f-225f-5a4c-9158-c4c19a70d4a8/output.h5 + store: '0' + - path: api/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt + store: 0 + - path: 94453a6a-c8d4-52b3-a22d-ccbf81f8d636/d4442ca4-23fd-5b6b-ba6d-0b75f711c109/y_1D.txt + store: 0 properties: - nodeUuid: + dataset: + deprecated: true + title: Dataset type: string - format: uuid - output: + eTag: + description: Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box). + title: Etag type: string - pattern: '^[-_a-zA-Z0-9]+$' - - type: object - additionalProperties: false + label: + description: The real file name + title: Label + type: string + path: + anyOf: + - pattern: '^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\/(.+)$' + type: string + - pattern: '^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$' + type: string + description: The path to the file in the storage provider domain + title: Path + store: + description: 'The store identifier: 0 for simcore S3, 1 for datcore' + title: Store + type: integer required: - store - path + title: SimCoreFileLink + type: object + - additionalProperties: false + description: I/O port type to hold a link to a file in DATCORE storage + example: + - dataset: 'N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4' + label: initial_WTstates + path: 'N:package:32df09ba-e8d6-46da-bd54-f696157de6ce' + store: 1 + - dataset: 'N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4' + label: initial_WTstates + path: 'N:package:32df09ba-e8d6-46da-bd54-f696157de6ce' + store: 1 properties: - store: - type: - - string - - integer dataset: + description: Unique identifier to access the dataset on datcore (REQUIRED for datcore) + title: Dataset type: string - path: + eTag: + description: Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box). + title: Etag type: string label: + description: The real file name + title: Label type: string - eTag: - type: string - - type: object - additionalProperties: false + path: + anyOf: + - pattern: '^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\/(.+)$' + type: string + - pattern: '^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$' + type: string + description: The path to the file in the storage provider domain + title: Path + store: + description: 'The store identifier: 0 for simcore S3, 1 for datcore' + title: Store + type: integer required: - - downloadLink + - store + - path + - label + - dataset + title: DatCoreFileLink + type: object + - additionalProperties: false + description: 'I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)' + example: + - downloadLink: 'https://fakeimg.pl/250x100/' properties: downloadLink: - minLength: 1 + format: uri maxLength: 65536 + minLength: 1 + title: Downloadlink type: string - format: uri label: + title: Label type: string - - type: array - items: {} - inputsUnits: + required: + - downloadLink + title: DownloadLink + type: object + - items: {} + type: array + - type: object + title: Inputs type: object - description: values of input unit + inputsUnits: + description: Overrides default unit (if any) defined in the service for each port patternProperties: '^[-_a-zA-Z0-9]+$': type: string - example: - - kilo-meter - - milli-second - - micro-gram - - kelvin - inputAccess: - description: map with key - access level pairs + title: Inputsunits type: object - patternProperties: - '^[-_a-zA-Z0-9]+$': - type: string - enum: - - Invisible - - ReadOnly - - ReadAndWrite - default: ReadAndWrite - example: - - ReadOnly - inputNodes: - type: array + key: + description: distinctive name for the node based on the docker registry path + example: + - simcore/services/comp/itis/sleeper + - simcore/services/dynamic/3dviewer + - simcore/services/frontend/file-picker + pattern: '^(simcore)/(services)/(comp|dynamic|frontend)(/[\w/-]+)+$' + title: Key + type: string + label: + description: The short name of the node + example: + - JupyterLab + title: Label + type: string + outputNode: + deprecated: true + title: Outputnode + type: boolean + outputNodes: + description: Used in group-nodes. Node IDs of those connected to the output items: - type: string format: uuid - description: node IDs of where the node is connected to - example: - - nodeUuid1 - - nodeUuid2 + type: string + title: Outputnodes + type: array outputs: - default: {} - type: object + description: values of output properties patternProperties: '^[-_a-zA-Z0-9]+$': - oneOf: - - type: - - integer - - boolean - - string - - number - - 'null' - - type: object - additionalProperties: false + anyOf: + - type: boolean + - type: integer + - type: number + - format: json-string + type: string + - type: string + - additionalProperties: false + description: I/O port type to hold a link to a file in simcore S3 storage + example: + - eTag: 859fda0cb82fc4acb4686510a172d9a9-1 + label: input.txt + path: 94453a6a-c8d4-52b3-a22d-ccbf81f8d636/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt + store: 0 + - eTag: f7e4c7076761a42a871e978c8691c676 + path: 50339632-ee1d-11ec-a0c2-02420a0194e4/23b1522f-225f-5a4c-9158-c4c19a70d4a8/output.h5 + store: '0' + - path: api/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt + store: 0 + - path: 94453a6a-c8d4-52b3-a22d-ccbf81f8d636/d4442ca4-23fd-5b6b-ba6d-0b75f711c109/y_1D.txt + store: 0 + properties: + dataset: + deprecated: true + title: Dataset + type: string + eTag: + description: Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box). + title: Etag + type: string + label: + description: The real file name + title: Label + type: string + path: + anyOf: + - pattern: '^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\/(.+)$' + type: string + - pattern: '^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$' + type: string + description: The path to the file in the storage provider domain + title: Path + store: + description: 'The store identifier: 0 for simcore S3, 1 for datcore' + title: Store + type: integer required: - store - path + title: SimCoreFileLink + type: object + - additionalProperties: false + description: I/O port type to hold a link to a file in DATCORE storage + example: + - dataset: 'N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4' + label: initial_WTstates + path: 'N:package:32df09ba-e8d6-46da-bd54-f696157de6ce' + store: 1 + - dataset: 'N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4' + label: initial_WTstates + path: 'N:package:32df09ba-e8d6-46da-bd54-f696157de6ce' + store: 1 properties: - store: - type: - - string - - integer dataset: + description: Unique identifier to access the dataset on datcore (REQUIRED for datcore) + title: Dataset type: string - path: + eTag: + description: Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box). + title: Etag type: string label: + description: The real file name + title: Label type: string - eTag: - type: string - - type: object - additionalProperties: false + path: + anyOf: + - pattern: '^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\/(.+)$' + type: string + - pattern: '^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$' + type: string + description: The path to the file in the storage provider domain + title: Path + store: + description: 'The store identifier: 0 for simcore S3, 1 for datcore' + title: Store + type: integer required: - - downloadLink + - store + - path + - label + - dataset + title: DatCoreFileLink + type: object + - additionalProperties: false + description: 'I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)' + example: + - downloadLink: 'https://fakeimg.pl/250x100/' properties: downloadLink: - minLength: 1 + format: uri maxLength: 65536 + minLength: 1 + title: Downloadlink type: string - format: uri label: + title: Label type: string - - type: array - items: {} - outputNode: - type: boolean - deprecated: true - outputNodes: - type: array - items: - type: string - format: uuid - description: Used in group-nodes. Node IDs of those connected to the output - example: - - nodeUuid1 - - nodeUuid2 - parent: - type: - - 'null' - - string - format: uuid - description: Parent's (group-nodes') node ID s. - example: - - nodeUuid1 - - nodeUuid2 - position: - type: object - additionalProperties: false - required: - - x - - 'y' - properties: - x: - type: integer - description: The x position - example: - - '12' - 'y': - type: integer - description: The y position - example: - - '15' - deprecated: true - state: - title: NodeState - type: object - properties: - modified: - title: Modified - description: true if the node's outputs need to be re-computed - default: true - type: boolean - dependencies: - title: Dependencies - description: contains the node inputs dependencies if they need to be computed first - type: array - uniqueItems: true - items: - type: string - format: uuid - currentStatus: - description: the node's current state - default: NOT_STARTED - example: - - RUNNING - - FAILED - enum: - - UNKNOWN - - PUBLISHED - - NOT_STARTED - - PENDING - - STARTED - - RETRY - - SUCCESS - - FAILED - - ABORTED - type: string - additionalProperties: false - bootOptions: - title: Boot Options - description: 'Some services provide alternative parameters to be injected at boot time. The user selection should be stored here, and it will overwrite the services''s defaults.' + required: + - downloadLink + title: DownloadLink + type: object + - items: {} + type: array + - type: object + title: Outputs type: object - patternProperties: - '[a-zA-Z][a-azA-Z0-9_]*': + parent: + anyOf: + - type: 'null' + - description: Parent's (group-nodes') node ID s. Used to group + format: uuid + title: Parent type: string - additionalProperties: true - ui: - type: object - additionalProperties: true - properties: - workbench: - type: object - x-patternProperties: - '^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?4[0-9a-fA-F]{3}-?[89abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$': - type: object - additionalProperties: false - required: - - position - properties: - position: - type: object - additionalProperties: false - required: - - x - - 'y' + position: + allOf: + - additionalProperties: false properties: x: - type: integer description: The x position example: - '12' - 'y': + title: X type: integer + 'y': description: The y position example: - '15' - marker: - type: object - additionalProperties: false + title: 'Y' + type: integer required: - - color - properties: - color: - type: string - description: Marker's color - example: - - '#FF0000' - - '#0000FF' - additionalProperties: true - slideshow: - type: object - x-patternProperties: - '^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?4[0-9a-fA-F]{3}-?[89abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$': - type: object - additionalProperties: false - required: - - position - properties: - position: - type: integer - description: Slide's position - example: - - 0 - - 2 - instructions: - type: - - string - - 'null' - description: Instructions about what to do in this step - example: - - This is a **sleeper** - - 'Please, select the config file defined [in this link](asdf)' - additionalProperties: true - currentNodeId: - type: string - format: uuid - annotations: - type: object - x-patternProperties: - '^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?4[0-9a-fA-F]{3}-?[89abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$': - type: object - additionalProperties: false - required: - - type - - color - - attributes - properties: - type: - type: string - description: Annotation type - example: - - rect - - text - color: - type: string - description: Annotation's color - example: - - '#FF0000' - - '#0000FF' - attributes: + - x + - 'y' + title: Position type: object - description: svg attributes - additionalProperties: true - tags: - type: array - items: - type: integer - classifiers: - type: array - description: Contains the reference to the project classifiers - items: - type: string - example: 'some:id:to:a:classifier' - dev: - type: object - description: object used for development purposes only - state: - title: State - description: Project state - anyOf: - - nullable: true - - title: ProjectState - type: object - additionalProperties: false - properties: - locked: - title: Locked - description: The project lock state + deprecated: true + description: Use projects_ui.WorkbenchUI.position instead + title: Position + progress: + description: the node progress value + maximum: 100 + minimum: 0 + title: Progress + type: number + runHash: + anyOf: + - type: 'null' + - description: the hex digest of the resolved inputs +outputs hash at the time when the last outputs were generated + title: Runhash + type: string + state: allOf: - - title: ProjectLocked - type: object - additionalProperties: false + - additionalProperties: false + example: + - currentStatus: NOT_STARTED + dependencies: [] + modified: true + - currentStatus: ABORTED + dependencies: + - 42838344-03de-4ce2-8d93-589a5dcdfd05 + modified: true + - currentStatus: SUCCESS + dependencies: [] + modified: false properties: - value: - title: Value - description: True if the project is locked - type: boolean - owner: - title: Owner - description: 'If locked, the user that owns the lock' + currentStatus: allOf: - - title: Owner - type: object - additionalProperties: false - properties: - user_id: - title: User Id - type: integer - description: Owner's identifier when registered in the user's database table - example: - - 2 - first_name: - title: First Name - description: Owner first name - example: - - John - type: string - last_name: - title: Last Name - description: Owner last name - example: - - Smith - type: string - required: - - user_id - - first_name - - last_name - status: - title: Status - description: The status of the project - enum: - - CLOSED - - CLOSING - - CLONING - - OPENING - - EXPORTING - - OPENED - type: string - required: - - value - - status - state: - title: State - description: The project running state - allOf: - - title: ProjectRunningState + - description: |- + State of execution of a project's computational workflow + + SEE StateType for task state + enum: + - UNKNOWN + - PUBLISHED + - NOT_STARTED + - PENDING + - STARTED + - RETRY + - SUCCESS + - FAILED + - ABORTED + title: RunningState + type: string + default: NOT_STARTED + description: the node's current state + dependencies: + description: contains the node inputs dependencies if they need to be computed first + items: + format: uuid + type: string + title: Dependencies + type: array + uniqueItems: true + modified: + default: true + description: true if the node's outputs need to be re-computed + title: Modified + type: boolean + title: NodeState type: object - additionalProperties: false - properties: - value: - title: RunningState - description: An enumeration. - enum: - - UNKNOWN - - NOT_STARTED - - PUBLISHED - - PENDING - - STARTED - - RETRY - - SUCCESS - - FAILED - - ABORTED - type: string - required: - - value + description: The node's state object + title: State + thumbnail: + description: url of the latest screenshot of the node + example: + - 'https://placeimg.com/171/96/tech/grayscale/?0.jpg' + format: uri + maxLength: 2083 + minLength: 0 + title: Thumbnail + type: string + version: + description: semantic version number of the node + example: + - 1.0.0 + - 0.0.1 + pattern: '^(0|[1-9]\d*)(\.(0|[1-9]\d*)){2}(-(0|[1-9]\d*|\d*[-a-zA-Z][-\da-zA-Z]*)(\.(0|[1-9]\d*|\d*[-a-zA-Z][-\da-zA-Z]*))*)?(\+[-\da-zA-Z]+(\.[-\da-zA-Z-]+)*)?$' + title: Version + type: string required: - - locked - - state - quality: - type: object - title: Quality - description: Object containing Quality Assessment related data + - key + - version + - label + title: Node + type: object + required: + - uuid + - name + - description + - thumbnail + - creationDate + - lastChangeDate + - workbench + - prjOwner + - accessRights + title: osparc-simcore project + type: object responses: '202': description: project created diff --git a/services/web/server/src/simcore_service_webserver/api/v0/schemas/node-meta-v0.0.1-pydantic.json b/services/web/server/src/simcore_service_webserver/api/v0/schemas/node-meta-v0.0.1-pydantic.json new file mode 100644 index 00000000000..6a5c0c7e6c7 --- /dev/null +++ b/services/web/server/src/simcore_service_webserver/api/v0/schemas/node-meta-v0.0.1-pydantic.json @@ -0,0 +1,1823 @@ +{ + "title": "ServiceDockerData", + "description": "Static metadata for a service injected in the image labels\n\nThis is one to one with node-meta-v0.0.1.json", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "short, human readable name for the node", + "example": "Fast Counter", + "type": "string" + }, + "thumbnail": { + "title": "Thumbnail", + "description": "url to the thumbnail", + "examples": [ + "https://user-images.githubusercontent.com/32800795/61083844-ff48fb00-a42c-11e9-8e63-fa2d709c8baf.png" + ], + "minLength": 1, + "maxLength": 2083, + "format": "uri", + "type": "string" + }, + "description": { + "title": "Description", + "description": "human readable description of the purpose of the node", + "examples": [ + "Our best node type", + "The mother of all nodes, makes your numbers shine!" + ], + "type": "string" + }, + "key": { + "title": "Key", + "description": "distinctive name for the node based on the docker registry path", + "pattern": "^(simcore)/(services)/(comp|dynamic|frontend)(/[\\w/-]+)+$", + "examples": [ + "simcore/services/comp/itis/sleeper", + "simcore/services/dynamic/3dviewer" + ], + "type": "string" + }, + "version": { + "title": "Version", + "description": "service version number", + "pattern": "^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){2}(-(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*)(\\.(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*))*)?(\\+[-\\da-zA-Z]+(\\.[-\\da-zA-Z-]+)*)?$", + "examples": [ + "1.0.0", + "0.0.1" + ], + "type": "string" + }, + "integration-version": { + "title": "Integration-Version", + "description": "integration version number", + "pattern": "^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){2}(-(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*)(\\.(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*))*)?(\\+[-\\da-zA-Z]+(\\.[-\\da-zA-Z-]+)*)?$", + "examples": [ + "1.0.0" + ], + "type": "string" + }, + "type": { + "description": "service type", + "examples": [ + "computational" + ], + "allOf": [ + { + "title": "ServiceType", + "description": "An enumeration.", + "enum": [ + "computational", + "dynamic", + "frontend", + "backend" + ], + "type": "string" + } + ] + }, + "badges": { + "title": "Badges", + "type": "array", + "items": { + "title": "Badge", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "Name of the subject", + "examples": [ + "travis-ci", + "coverals.io", + "github.io" + ], + "type": "string" + }, + "image": { + "title": "Image", + "description": "Url to the badge", + "examples": [ + "https://travis-ci.org/ITISFoundation/osparc-simcore.svg?branch=master", + "https://coveralls.io/repos/github/ITISFoundation/osparc-simcore/badge.svg?branch=master", + "https://img.shields.io/website-up-down-green-red/https/itisfoundation.github.io.svg?label=documentation" + ], + "minLength": 1, + "maxLength": 2083, + "format": "uri", + "type": "string" + }, + "url": { + "title": "Url", + "description": "Link to the status", + "examples": [ + "https://travis-ci.org/ITISFoundation/osparc-simcore 'State of CI: build, test and pushing images'", + "https://coveralls.io/github/ITISFoundation/osparc-simcore?branch=master 'Test coverage'", + "https://itisfoundation.github.io/" + ], + "minLength": 1, + "maxLength": 2083, + "format": "uri", + "type": "string" + } + }, + "required": [ + "name", + "image", + "url" + ], + "additionalProperties": false + } + }, + "authors": { + "title": "Authors", + "minItems": 1, + "type": "array", + "items": { + "title": "Author", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "Name of the author", + "example": "Jim Knopf", + "type": "string" + }, + "email": { + "title": "Email", + "description": "Email address", + "examples": [ + "sun@sense.eight", + "deleen@minbar.bab" + ], + "type": "string", + "format": "email" + }, + "affiliation": { + "title": "Affiliation", + "description": "Affiliation of the author", + "examples": [ + "Sense8", + "Babylon 5" + ], + "type": "string" + } + }, + "required": [ + "name", + "email" + ], + "additionalProperties": false + } + }, + "contact": { + "title": "Contact", + "description": "email to correspond to the authors about the node", + "examples": [ + "lab@net.flix" + ], + "type": "string", + "format": "email" + }, + "inputs": { + "title": "Inputs", + "description": "definition of the inputs of this node", + "type": "object", + "patternProperties": { + "^[-_a-zA-Z0-9]+$": { + "title": "ServiceInput", + "description": "Metadata on a service input port", + "type": "object", + "properties": { + "displayOrder": { + "title": "Displayorder", + "description": "DEPRECATED: new display order is taken from the item position. This will be removed.", + "deprecated": true, + "type": "number" + }, + "label": { + "title": "Label", + "description": "short name for the property", + "example": "Age", + "type": "string" + }, + "description": { + "title": "Description", + "description": "description of the property", + "example": "Age in seconds since 1970", + "type": "string" + }, + "type": { + "title": "Type", + "description": "data type expected on this input glob matching for data type is allowed", + "pattern": "^(number|integer|boolean|string|ref_contentSchema|data:([^/\\s,]+/[^/\\s,]+|\\[[^/\\s,]+/[^/\\s,]+(,[^/\\s]+/[^/,\\s]+)*\\]))$", + "examples": [ + "number", + "boolean", + "data:*/*", + "data:text/*", + "data:[image/jpeg,image/png]", + "data:application/json", + "data:application/json;schema=https://my-schema/not/really/schema.json", + "data:application/vnd.ms-excel", + "data:text/plain", + "data:application/hdf5", + "data:application/edu.ucdavis@ceclancy.xyz" + ], + "type": "string" + }, + "contentSchema": { + "title": "Contentschema", + "description": "jsonschema of this input/output. Required when type='ref_contentSchema'", + "type": "object" + }, + "fileToKeyMap": { + "title": "Filetokeymap", + "description": "Place the data associated with the named keys in files", + "examples": [ + { + "dir/input1.txt": "key_1", + "dir33/input2.txt": "key2" + } + ], + "type": "object", + "patternProperties": { + ".+": { + "type": "string", + "pattern": "^[-_a-zA-Z0-9]+$" + } + } + }, + "unit": { + "title": "Unit", + "description": "Units, when it refers to a physical quantity", + "type": "string" + }, + "defaultValue": { + "title": "Defaultvalue", + "examples": [ + "Dog", + true + ], + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "widget": { + "title": "Widget", + "description": "custom widget to use instead of the default one determined from the data-type", + "allOf": [ + { + "title": "Widget", + "type": "object", + "properties": { + "type": { + "description": "type of the property", + "allOf": [ + { + "title": "WidgetType", + "description": "An enumeration.", + "enum": [ + "TextArea", + "SelectBox" + ], + "type": "string" + } + ] + }, + "details": { + "title": "Details", + "anyOf": [ + { + "title": "TextArea", + "type": "object", + "properties": { + "minHeight": { + "title": "Minheight", + "description": "minimum Height of the textarea", + "exclusiveMinimum": 0, + "type": "integer" + } + }, + "required": [ + "minHeight" + ], + "additionalProperties": false + }, + { + "title": "SelectBox", + "type": "object", + "properties": { + "structure": { + "title": "Structure", + "minItems": 1, + "type": "array", + "items": { + "title": "Structure", + "type": "object", + "properties": { + "key": { + "title": "Key", + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "key", + "label" + ], + "additionalProperties": false + } + } + }, + "required": [ + "structure" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "type", + "details" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "label", + "description", + "type" + ], + "additionalProperties": false, + "examples": [ + { + "displayOrder": 1, + "label": "Input files - file-wo-widget", + "description": "Files downloaded from service connected at the input", + "type": "data:*/*" + }, + { + "displayOrder": 2, + "label": "Sleep Time - v2", + "description": "Time to wait before completion", + "type": "number", + "defaultValue": 0, + "unit": "second", + "widget": { + "type": "TextArea", + "details": { + "minHeight": 3 + } + } + }, + { + "label": "Sleep Time - latest", + "description": "Time to wait before completion", + "type": "number", + "defaultValue": 0, + "unit": "second", + "widget": { + "type": "TextArea", + "details": { + "minHeight": 3 + } + } + }, + { + "label": "array_numbers", + "description": "Some array of numbers", + "type": "ref_contentSchema", + "contentSchema": { + "title": "list[number]", + "type": "array", + "items": { + "type": "number" + } + } + }, + { + "label": "my_object", + "description": "Some object", + "type": "ref_contentSchema", + "contentSchema": { + "title": "an object named A", + "type": "object", + "properties": { + "i": { + "title": "Int", + "type": "integer", + "default": 3 + }, + "b": { + "title": "Bool", + "type": "boolean" + }, + "s": { + "title": "Str", + "type": "string" + } + }, + "required": [ + "b", + "s" + ] + } + } + ] + } + } + }, + "outputs": { + "title": "Outputs", + "description": "definition of the outputs of this node", + "type": "object", + "patternProperties": { + "^[-_a-zA-Z0-9]+$": { + "title": "ServiceOutput", + "description": "Base class for service input/outputs", + "type": "object", + "properties": { + "displayOrder": { + "title": "Displayorder", + "description": "DEPRECATED: new display order is taken from the item position. This will be removed.", + "deprecated": true, + "type": "number" + }, + "label": { + "title": "Label", + "description": "short name for the property", + "example": "Age", + "type": "string" + }, + "description": { + "title": "Description", + "description": "description of the property", + "example": "Age in seconds since 1970", + "type": "string" + }, + "type": { + "title": "Type", + "description": "data type expected on this input glob matching for data type is allowed", + "pattern": "^(number|integer|boolean|string|ref_contentSchema|data:([^/\\s,]+/[^/\\s,]+|\\[[^/\\s,]+/[^/\\s,]+(,[^/\\s]+/[^/,\\s]+)*\\]))$", + "examples": [ + "number", + "boolean", + "data:*/*", + "data:text/*", + "data:[image/jpeg,image/png]", + "data:application/json", + "data:application/json;schema=https://my-schema/not/really/schema.json", + "data:application/vnd.ms-excel", + "data:text/plain", + "data:application/hdf5", + "data:application/edu.ucdavis@ceclancy.xyz" + ], + "type": "string" + }, + "contentSchema": { + "title": "Contentschema", + "description": "jsonschema of this input/output. Required when type='ref_contentSchema'", + "type": "object" + }, + "fileToKeyMap": { + "title": "Filetokeymap", + "description": "Place the data associated with the named keys in files", + "examples": [ + { + "dir/input1.txt": "key_1", + "dir33/input2.txt": "key2" + } + ], + "type": "object", + "patternProperties": { + ".+": { + "type": "string", + "pattern": "^[-_a-zA-Z0-9]+$" + } + } + }, + "unit": { + "title": "Unit", + "description": "Units, when it refers to a physical quantity", + "type": "string" + }, + "widget": { + "title": "Widget", + "description": "custom widget to use instead of the default one determined from the data-type", + "deprecated": true, + "allOf": [ + { + "title": "Widget", + "type": "object", + "properties": { + "type": { + "description": "type of the property", + "allOf": [ + { + "title": "WidgetType", + "description": "An enumeration.", + "enum": [ + "TextArea", + "SelectBox" + ], + "type": "string" + } + ] + }, + "details": { + "title": "Details", + "anyOf": [ + { + "title": "TextArea", + "type": "object", + "properties": { + "minHeight": { + "title": "Minheight", + "description": "minimum Height of the textarea", + "exclusiveMinimum": 0, + "type": "integer" + } + }, + "required": [ + "minHeight" + ], + "additionalProperties": false + }, + { + "title": "SelectBox", + "type": "object", + "properties": { + "structure": { + "title": "Structure", + "minItems": 1, + "type": "array", + "items": { + "title": "Structure", + "type": "object", + "properties": { + "key": { + "title": "Key", + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "key", + "label" + ], + "additionalProperties": false + } + } + }, + "required": [ + "structure" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "type", + "details" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "label", + "description", + "type" + ], + "additionalProperties": false, + "examples": [ + { + "displayOrder": 2, + "label": "Time Slept", + "description": "Time the service waited before completion", + "type": "number" + }, + { + "displayOrder": 2, + "label": "Time Slept - units", + "description": "Time the service waited before completion", + "type": "number", + "unit": "second" + }, + { + "label": "Time Slept - w/o displayorder", + "description": "Time the service waited before completion", + "type": "number", + "unit": "second" + }, + { + "label": "Output file 1", + "displayOrder": 4.0, + "description": "Output file uploaded from the outputs folder", + "type": "data:*/*" + } + ] + } + } + }, + "boot-options": { + "title": "Boot-Options", + "description": "Service defined boot options. These get injected in the service as env variables.", + "type": "object", + "patternProperties": { + "[a-zA-Z][a-azA-Z0-9_]*": { + "title": "BootOption", + "type": "object", + "properties": { + "label": { + "title": "Label", + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + }, + "default": { + "title": "Default", + "type": "string" + }, + "items": { + "title": "Items", + "type": "object", + "additionalProperties": { + "title": "BootChoice", + "type": "object", + "properties": { + "label": { + "title": "Label", + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + } + }, + "required": [ + "label", + "description" + ], + "examples": [ + { + "label": "Boot mode", + "description": "Start it in web page mode", + "default": "0", + "items": { + "0": { + "label": "Non Voila", + "description": "Tooltip for non Voila boot mode" + }, + "1": { + "label": "Voila", + "description": "Tooltip for Voila boot mode" + } + } + }, + { + "label": "Application theme", + "description": "Select a theme for the application", + "default": "b", + "items": { + "a": { + "label": "Clear", + "description": "Using white background" + }, + "b": { + "label": "Dark", + "description": "Using black and gray tones" + } + } + } + ] + } + } + }, + "required": [ + "label", + "description", + "default", + "items" + ], + "examples": [ + { + "label": "Boot mode", + "description": "Start it in web page mode", + "default": "0", + "items": { + "0": { + "label": "Non Voila", + "description": "Tooltip for non Voila boot mode" + }, + "1": { + "label": "Voila", + "description": "Tooltip for Voila boot mode" + } + } + }, + { + "label": "Application theme", + "description": "Select a theme for the application", + "default": "b", + "items": { + "a": { + "label": "Clear", + "description": "Using white background" + }, + "b": { + "label": "Dark", + "description": "Using black and gray tones" + } + } + } + ] + } + } + } + }, + "required": [ + "name", + "description", + "key", + "version", + "type", + "authors", + "contact", + "inputs", + "outputs" + ], + "additionalProperties": false, + "examples": [ + { + "name": "oSparc Python Runner", + "key": "simcore/services/comp/osparc-python-runner", + "type": "computational", + "integration-version": "1.0.0", + "version": "1.7.0", + "description": "oSparc Python Runner", + "contact": "smith@company.com", + "authors": [ + { + "name": "John Smith", + "email": "smith@company.com", + "affiliation": "Company" + }, + { + "name": "Richard Brown", + "email": "brown@uni.edu", + "affiliation": "University" + } + ], + "inputs": { + "input_1": { + "displayOrder": 1, + "label": "Input data", + "description": "Any code, requirements or data file", + "type": "data:*/*" + } + }, + "outputs": { + "output_1": { + "displayOrder": 1, + "label": "Output data", + "description": "All data produced by the script is zipped as output_data.zip", + "type": "data:*/*", + "fileToKeyMap": { + "output_data.zip": "output_1" + } + } + } + }, + { + "name": "oSparc Python Runner", + "key": "simcore/services/comp/osparc-python-runner", + "type": "computational", + "integration-version": "1.0.0", + "version": "1.7.0", + "description": "oSparc Python Runner", + "contact": "smith@company.com", + "authors": [ + { + "name": "John Smith", + "email": "smith@company.com", + "affiliation": "Company" + }, + { + "name": "Richard Brown", + "email": "brown@uni.edu", + "affiliation": "University" + } + ], + "inputs": { + "input_1": { + "label": "Input data", + "description": "Any code, requirements or data file", + "type": "data:*/*" + } + }, + "outputs": { + "output_1": { + "label": "Output data", + "description": "All data produced by the script is zipped as output_data.zip", + "type": "data:*/*", + "fileToKeyMap": { + "output_data.zip": "output_1" + } + } + }, + "boot-options": { + "example_service_defined_boot_mode": { + "label": "Boot mode", + "description": "Start it in web page mode", + "default": "0", + "items": { + "0": { + "label": "Non Voila", + "description": "Tooltip for non Voila boot mode" + }, + "1": { + "label": "Voila", + "description": "Tooltip for Voila boot mode" + } + } + }, + "example_service_defined_theme_selection": { + "label": "Application theme", + "description": "Select a theme for the application", + "default": "b", + "items": { + "a": { + "label": "Clear", + "description": "Using white background" + }, + "b": { + "label": "Dark", + "description": "Using black and gray tones" + } + } + } + } + } + ], + "definitions": { + "ServiceType": { + "title": "ServiceType", + "description": "An enumeration.", + "enum": [ + "computational", + "dynamic", + "frontend", + "backend" + ], + "type": "string" + }, + "Badge": { + "title": "Badge", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "Name of the subject", + "examples": [ + "travis-ci", + "coverals.io", + "github.io" + ], + "type": "string" + }, + "image": { + "title": "Image", + "description": "Url to the badge", + "examples": [ + "https://travis-ci.org/ITISFoundation/osparc-simcore.svg?branch=master", + "https://coveralls.io/repos/github/ITISFoundation/osparc-simcore/badge.svg?branch=master", + "https://img.shields.io/website-up-down-green-red/https/itisfoundation.github.io.svg?label=documentation" + ], + "minLength": 1, + "maxLength": 2083, + "format": "uri", + "type": "string" + }, + "url": { + "title": "Url", + "description": "Link to the status", + "examples": [ + "https://travis-ci.org/ITISFoundation/osparc-simcore 'State of CI: build, test and pushing images'", + "https://coveralls.io/github/ITISFoundation/osparc-simcore?branch=master 'Test coverage'", + "https://itisfoundation.github.io/" + ], + "minLength": 1, + "maxLength": 2083, + "format": "uri", + "type": "string" + } + }, + "required": [ + "name", + "image", + "url" + ], + "additionalProperties": false + }, + "Author": { + "title": "Author", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "Name of the author", + "example": "Jim Knopf", + "type": "string" + }, + "email": { + "title": "Email", + "description": "Email address", + "examples": [ + "sun@sense.eight", + "deleen@minbar.bab" + ], + "type": "string", + "format": "email" + }, + "affiliation": { + "title": "Affiliation", + "description": "Affiliation of the author", + "examples": [ + "Sense8", + "Babylon 5" + ], + "type": "string" + } + }, + "required": [ + "name", + "email" + ], + "additionalProperties": false + }, + "WidgetType": { + "title": "WidgetType", + "description": "An enumeration.", + "enum": [ + "TextArea", + "SelectBox" + ], + "type": "string" + }, + "TextArea": { + "title": "TextArea", + "type": "object", + "properties": { + "minHeight": { + "title": "Minheight", + "description": "minimum Height of the textarea", + "exclusiveMinimum": 0, + "type": "integer" + } + }, + "required": [ + "minHeight" + ], + "additionalProperties": false + }, + "Structure": { + "title": "Structure", + "type": "object", + "properties": { + "key": { + "title": "Key", + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "key", + "label" + ], + "additionalProperties": false + }, + "SelectBox": { + "title": "SelectBox", + "type": "object", + "properties": { + "structure": { + "title": "Structure", + "minItems": 1, + "type": "array", + "items": { + "title": "Structure", + "type": "object", + "properties": { + "key": { + "title": "Key", + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "key", + "label" + ], + "additionalProperties": false + } + } + }, + "required": [ + "structure" + ], + "additionalProperties": false + }, + "Widget": { + "title": "Widget", + "type": "object", + "properties": { + "type": { + "description": "type of the property", + "allOf": [ + { + "title": "WidgetType", + "description": "An enumeration.", + "enum": [ + "TextArea", + "SelectBox" + ], + "type": "string" + } + ] + }, + "details": { + "title": "Details", + "anyOf": [ + { + "title": "TextArea", + "type": "object", + "properties": { + "minHeight": { + "title": "Minheight", + "description": "minimum Height of the textarea", + "exclusiveMinimum": 0, + "type": "integer" + } + }, + "required": [ + "minHeight" + ], + "additionalProperties": false + }, + { + "title": "SelectBox", + "type": "object", + "properties": { + "structure": { + "title": "Structure", + "minItems": 1, + "type": "array", + "items": { + "title": "Structure", + "type": "object", + "properties": { + "key": { + "title": "Key", + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "key", + "label" + ], + "additionalProperties": false + } + } + }, + "required": [ + "structure" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "type", + "details" + ], + "additionalProperties": false + }, + "ServiceInput": { + "title": "ServiceInput", + "description": "Metadata on a service input port", + "type": "object", + "properties": { + "displayOrder": { + "title": "Displayorder", + "description": "DEPRECATED: new display order is taken from the item position. This will be removed.", + "deprecated": true, + "type": "number" + }, + "label": { + "title": "Label", + "description": "short name for the property", + "example": "Age", + "type": "string" + }, + "description": { + "title": "Description", + "description": "description of the property", + "example": "Age in seconds since 1970", + "type": "string" + }, + "type": { + "title": "Type", + "description": "data type expected on this input glob matching for data type is allowed", + "pattern": "^(number|integer|boolean|string|ref_contentSchema|data:([^/\\s,]+/[^/\\s,]+|\\[[^/\\s,]+/[^/\\s,]+(,[^/\\s]+/[^/,\\s]+)*\\]))$", + "examples": [ + "number", + "boolean", + "data:*/*", + "data:text/*", + "data:[image/jpeg,image/png]", + "data:application/json", + "data:application/json;schema=https://my-schema/not/really/schema.json", + "data:application/vnd.ms-excel", + "data:text/plain", + "data:application/hdf5", + "data:application/edu.ucdavis@ceclancy.xyz" + ], + "type": "string" + }, + "contentSchema": { + "title": "Contentschema", + "description": "jsonschema of this input/output. Required when type='ref_contentSchema'", + "type": "object" + }, + "fileToKeyMap": { + "title": "Filetokeymap", + "description": "Place the data associated with the named keys in files", + "examples": [ + { + "dir/input1.txt": "key_1", + "dir33/input2.txt": "key2" + } + ], + "type": "object", + "patternProperties": { + ".+": { + "type": "string", + "pattern": "^[-_a-zA-Z0-9]+$" + } + } + }, + "unit": { + "title": "Unit", + "description": "Units, when it refers to a physical quantity", + "type": "string" + }, + "defaultValue": { + "title": "Defaultvalue", + "examples": [ + "Dog", + true + ], + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "widget": { + "title": "Widget", + "description": "custom widget to use instead of the default one determined from the data-type", + "allOf": [ + { + "title": "Widget", + "type": "object", + "properties": { + "type": { + "description": "type of the property", + "allOf": [ + { + "title": "WidgetType", + "description": "An enumeration.", + "enum": [ + "TextArea", + "SelectBox" + ], + "type": "string" + } + ] + }, + "details": { + "title": "Details", + "anyOf": [ + { + "title": "TextArea", + "type": "object", + "properties": { + "minHeight": { + "title": "Minheight", + "description": "minimum Height of the textarea", + "exclusiveMinimum": 0, + "type": "integer" + } + }, + "required": [ + "minHeight" + ], + "additionalProperties": false + }, + { + "title": "SelectBox", + "type": "object", + "properties": { + "structure": { + "title": "Structure", + "minItems": 1, + "type": "array", + "items": { + "title": "Structure", + "type": "object", + "properties": { + "key": { + "title": "Key", + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "key", + "label" + ], + "additionalProperties": false + } + } + }, + "required": [ + "structure" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "type", + "details" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "label", + "description", + "type" + ], + "additionalProperties": false, + "examples": [ + { + "displayOrder": 1, + "label": "Input files - file-wo-widget", + "description": "Files downloaded from service connected at the input", + "type": "data:*/*" + }, + { + "displayOrder": 2, + "label": "Sleep Time - v2", + "description": "Time to wait before completion", + "type": "number", + "defaultValue": 0, + "unit": "second", + "widget": { + "type": "TextArea", + "details": { + "minHeight": 3 + } + } + }, + { + "label": "Sleep Time - latest", + "description": "Time to wait before completion", + "type": "number", + "defaultValue": 0, + "unit": "second", + "widget": { + "type": "TextArea", + "details": { + "minHeight": 3 + } + } + }, + { + "label": "array_numbers", + "description": "Some array of numbers", + "type": "ref_contentSchema", + "contentSchema": { + "title": "list[number]", + "type": "array", + "items": { + "type": "number" + } + } + }, + { + "label": "my_object", + "description": "Some object", + "type": "ref_contentSchema", + "contentSchema": { + "title": "an object named A", + "type": "object", + "properties": { + "i": { + "title": "Int", + "type": "integer", + "default": 3 + }, + "b": { + "title": "Bool", + "type": "boolean" + }, + "s": { + "title": "Str", + "type": "string" + } + }, + "required": [ + "b", + "s" + ] + } + } + ] + }, + "ServiceOutput": { + "title": "ServiceOutput", + "description": "Base class for service input/outputs", + "type": "object", + "properties": { + "displayOrder": { + "title": "Displayorder", + "description": "DEPRECATED: new display order is taken from the item position. This will be removed.", + "deprecated": true, + "type": "number" + }, + "label": { + "title": "Label", + "description": "short name for the property", + "example": "Age", + "type": "string" + }, + "description": { + "title": "Description", + "description": "description of the property", + "example": "Age in seconds since 1970", + "type": "string" + }, + "type": { + "title": "Type", + "description": "data type expected on this input glob matching for data type is allowed", + "pattern": "^(number|integer|boolean|string|ref_contentSchema|data:([^/\\s,]+/[^/\\s,]+|\\[[^/\\s,]+/[^/\\s,]+(,[^/\\s]+/[^/,\\s]+)*\\]))$", + "examples": [ + "number", + "boolean", + "data:*/*", + "data:text/*", + "data:[image/jpeg,image/png]", + "data:application/json", + "data:application/json;schema=https://my-schema/not/really/schema.json", + "data:application/vnd.ms-excel", + "data:text/plain", + "data:application/hdf5", + "data:application/edu.ucdavis@ceclancy.xyz" + ], + "type": "string" + }, + "contentSchema": { + "title": "Contentschema", + "description": "jsonschema of this input/output. Required when type='ref_contentSchema'", + "type": "object" + }, + "fileToKeyMap": { + "title": "Filetokeymap", + "description": "Place the data associated with the named keys in files", + "examples": [ + { + "dir/input1.txt": "key_1", + "dir33/input2.txt": "key2" + } + ], + "type": "object", + "patternProperties": { + ".+": { + "type": "string", + "pattern": "^[-_a-zA-Z0-9]+$" + } + } + }, + "unit": { + "title": "Unit", + "description": "Units, when it refers to a physical quantity", + "type": "string" + }, + "widget": { + "title": "Widget", + "description": "custom widget to use instead of the default one determined from the data-type", + "deprecated": true, + "allOf": [ + { + "title": "Widget", + "type": "object", + "properties": { + "type": { + "description": "type of the property", + "allOf": [ + { + "title": "WidgetType", + "description": "An enumeration.", + "enum": [ + "TextArea", + "SelectBox" + ], + "type": "string" + } + ] + }, + "details": { + "title": "Details", + "anyOf": [ + { + "title": "TextArea", + "type": "object", + "properties": { + "minHeight": { + "title": "Minheight", + "description": "minimum Height of the textarea", + "exclusiveMinimum": 0, + "type": "integer" + } + }, + "required": [ + "minHeight" + ], + "additionalProperties": false + }, + { + "title": "SelectBox", + "type": "object", + "properties": { + "structure": { + "title": "Structure", + "minItems": 1, + "type": "array", + "items": { + "title": "Structure", + "type": "object", + "properties": { + "key": { + "title": "Key", + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "key", + "label" + ], + "additionalProperties": false + } + } + }, + "required": [ + "structure" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "type", + "details" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "label", + "description", + "type" + ], + "additionalProperties": false, + "examples": [ + { + "displayOrder": 2, + "label": "Time Slept", + "description": "Time the service waited before completion", + "type": "number" + }, + { + "displayOrder": 2, + "label": "Time Slept - units", + "description": "Time the service waited before completion", + "type": "number", + "unit": "second" + }, + { + "label": "Time Slept - w/o displayorder", + "description": "Time the service waited before completion", + "type": "number", + "unit": "second" + }, + { + "label": "Output file 1", + "displayOrder": 4.0, + "description": "Output file uploaded from the outputs folder", + "type": "data:*/*" + } + ] + }, + "BootChoice": { + "title": "BootChoice", + "type": "object", + "properties": { + "label": { + "title": "Label", + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + } + }, + "required": [ + "label", + "description" + ], + "examples": [ + { + "label": "Boot mode", + "description": "Start it in web page mode", + "default": "0", + "items": { + "0": { + "label": "Non Voila", + "description": "Tooltip for non Voila boot mode" + }, + "1": { + "label": "Voila", + "description": "Tooltip for Voila boot mode" + } + } + }, + { + "label": "Application theme", + "description": "Select a theme for the application", + "default": "b", + "items": { + "a": { + "label": "Clear", + "description": "Using white background" + }, + "b": { + "label": "Dark", + "description": "Using black and gray tones" + } + } + } + ] + }, + "BootOption": { + "title": "BootOption", + "type": "object", + "properties": { + "label": { + "title": "Label", + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + }, + "default": { + "title": "Default", + "type": "string" + }, + "items": { + "title": "Items", + "type": "object", + "additionalProperties": { + "title": "BootChoice", + "type": "object", + "properties": { + "label": { + "title": "Label", + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + } + }, + "required": [ + "label", + "description" + ], + "examples": [ + { + "label": "Boot mode", + "description": "Start it in web page mode", + "default": "0", + "items": { + "0": { + "label": "Non Voila", + "description": "Tooltip for non Voila boot mode" + }, + "1": { + "label": "Voila", + "description": "Tooltip for Voila boot mode" + } + } + }, + { + "label": "Application theme", + "description": "Select a theme for the application", + "default": "b", + "items": { + "a": { + "label": "Clear", + "description": "Using white background" + }, + "b": { + "label": "Dark", + "description": "Using black and gray tones" + } + } + } + ] + } + } + }, + "required": [ + "label", + "description", + "default", + "items" + ], + "examples": [ + { + "label": "Boot mode", + "description": "Start it in web page mode", + "default": "0", + "items": { + "0": { + "label": "Non Voila", + "description": "Tooltip for non Voila boot mode" + }, + "1": { + "label": "Voila", + "description": "Tooltip for Voila boot mode" + } + } + }, + { + "label": "Application theme", + "description": "Select a theme for the application", + "default": "b", + "items": { + "a": { + "label": "Clear", + "description": "Using white background" + }, + "b": { + "label": "Dark", + "description": "Using black and gray tones" + } + } + } + ] + } + } +} \ No newline at end of file diff --git a/services/web/server/src/simcore_service_webserver/api/v0/schemas/node-meta-v0.0.1.json b/services/web/server/src/simcore_service_webserver/api/v0/schemas/node-meta-v0.0.1.json deleted file mode 100644 index a47f6c2ad3b..00000000000 --- a/services/web/server/src/simcore_service_webserver/api/v0/schemas/node-meta-v0.0.1.json +++ /dev/null @@ -1,477 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "simcore node", - "description": "Description of a simcore node 'class' with input and output", - "type": "object", - "additionalProperties": false, - "required": [ - "key", - "version", - "type", - "name", - "description", - "authors", - "contact", - "inputs", - "outputs" - ], - "properties": { - "key": { - "type": "string", - "description": "distinctive name for the node based on the docker registry path", - "pattern": "^(simcore)/(services)/(comp|dynamic|frontend)(/[\\w/-]+)+$", - "examples": [ - "simcore/services/comp/itis/sleeper", - "simcore/services/dynamic/3dviewer" - ] - }, - "integration-version": { - "type": "string", - "description": "integration version number", - "pattern": "^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){2}(-(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*)(\\.(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*))*)?(\\+[-\\da-zA-Z]+(\\.[-\\da-zA-Z-]+)*)?$", - "examples": [ - "1.0.0" - ] - }, - "version": { - "type": "string", - "description": "service version number", - "pattern": "^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){2}(-(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*)(\\.(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*))*)?(\\+[-\\da-zA-Z]+(\\.[-\\da-zA-Z-]+)*)?$", - "examples": [ - "1.0.0", - "0.0.1" - ] - }, - "type": { - "type": "string", - "description": "service type", - "enum": [ - "frontend", - "computational", - "dynamic" - ], - "examples": [ - "computational" - ] - }, - "name": { - "type": "string", - "description": "short, human readable name for the node", - "examples": [ - "Fast Counter" - ] - }, - "thumbnail": { - "type": "string", - "description": "url to the thumbnail", - "examples": [ - "https://user-images.githubusercontent.com/32800795/61083844-ff48fb00-a42c-11e9-8e63-fa2d709c8baf.png" - ] - }, - "badges": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name", - "image", - "url" - ], - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "description": "Name of the subject", - "examples": [ - "travis-ci", - "coverals.io", - "github.io" - ] - }, - "image": { - "type": "string", - "description": "Url to the shield", - "examples": [ - "https://travis-ci.org/ITISFoundation/osparc-simcore.svg?branch=master", - "https://coveralls.io/repos/github/ITISFoundation/osparc-simcore/badge.svg?branch=master", - "https://img.shields.io/website-up-down-green-red/https/itisfoundation.github.io.svg?label=documentation" - ] - }, - "url": { - "type": "string", - "description": "Link to status", - "examples": [ - "https://travis-ci.org/ITISFoundation/osparc-simcore 'State of CI: build, test and pushing images'", - "https://coveralls.io/github/ITISFoundation/osparc-simcore?branch=master 'Test coverage'", - "https://itisfoundation.github.io/" - ] - } - } - } - }, - "description": { - "type": "string", - "description": "human readable description of the purpose of the node", - "examples": [ - "Our best node type", - "The mother of all nodes, makes your numbers shine!" - ] - }, - "authors": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "name", - "email" - ], - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "description": "Name of the author", - "examples": [ - "Sun Bak", - "Delenn" - ] - }, - "email": { - "description": "Email address", - "type": "string", - "format": "email", - "examples": [ - "sun@sense.eight", - "deleen@minbar.bab" - ] - }, - "affiliation": { - "description": "Affiliation of the author", - "type": "string", - "examples": [ - "Sense8", - "Babylon 5" - ] - } - } - } - }, - "contact": { - "type": "string", - "format": "email", - "description": "email to correspond to the authors about the node", - "examples": [ - "lab@net.flix" - ] - }, - "inputs": { - "type": "object", - "description": "definition of the inputs of this node", - "patternProperties": { - "^[-_a-zA-Z0-9]+$": { - "type": "object", - "description": "all the input configurable for this service", - "additionalProperties": false, - "required": [ - "displayOrder", - "label", - "description", - "type" - ], - "properties": { - "displayOrder": { - "description": "DEPRECATED: new display order is taken from the item position. This property will be removed.", - "deprecated": true, - "type": "number" - }, - "label": { - "type": "string", - "description": "short name for the property", - "examples": [ - "Age" - ] - }, - "description": { - "type": "string", - "description": "description of the property", - "examples": [ - "Age in seconds since 1970" - ] - }, - "type": { - "type": "string", - "pattern": "^(number|integer|boolean|string|ref_contentSchema|data:([^/\\s,]+/[^/\\s,]+|\\[[^/\\s,]+/[^/\\s,]+(,[^/\\s]+/[^/,\\s]+)*\\]))$", - "description": "data type expected on this input glob matching for data type is allowed", - "examples": [ - "number", - "boolean", - "data:*/*", - "data:text/*", - "data:[image/jpeg,image/png]", - "data:application/json", - "data:application/json;schema=https://my-schema/not/really/schema.json", - "data:application/vnd.ms-excel", - "data:text/plain", - "data:application/hdf5", - "data:application/edu.ucdavis@ceclancy.xyz" - ] - }, - "contentSchema": { - "title": "Content Schema", - "description": "jsonschema of the content at this input/output. Required when type='ref_contentSchema'", - "type": "object" - }, - "fileToKeyMap": { - "description": "Place the data associated with the named keys in files", - "type": "object", - "patternProperties": { - ".+": { - "type": "string", - "pattern": "^[-_a-zA-Z0-9]+$" - } - }, - "examples": [ - { - "dir/input1.txt": "key_1", - "dir33/input2.txt": "key2" - } - ] - }, - "defaultValue": { - "description": "initial value for this input", - "type": [ - "string", - "number", - "integer", - "boolean" - ], - "examples": [ - "Dog", - true - ] - }, - "unit": { - "title": "Unit", - "description": "Units of this input value, if a physical quantity", - "type": "string" - }, - "widget": { - "description": "custom widget to use instead of the default one determined from the data-type", - "anyOf": [ - { - "type": "object", - "additionalProperties": false, - "required": [ - "type" - ], - "properties": { - "type": { - "description": "type of the property", - "type": "string", - "enum": [ - "TextArea" - ] - }, - "minHeight": { - "description": "minimum Height of the textarea", - "type": "integer", - "minimum": 1 - } - } - }, - { - "type": "object", - "additionalProperties": false, - "required": [ - "type", - "structure" - ], - "properties": { - "type": { - "description": "type of the property", - "type": "string", - "enum": [ - "SelectBox" - ] - }, - "structure": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "additionalProperties": false, - "required": [ - "key", - "label" - ], - "properties": { - "key": { - "type": [ - "string", - "boolean", - "number" - ] - }, - "label": { - "type": "string" - } - }, - "examples": [ - [ - { - "key": "rat", - "label": "The Rat" - }, - { - "key": "dog", - "label": "Bello the Dog" - } - ] - ] - } - } - } - } - ] - } - } - } - } - }, - "outputs": { - "type": "object", - "description": "definition of the outputs of this node", - "patternProperties": { - "^[-_a-zA-Z0-9]+$": { - "type": "object", - "description": "all the output produced by this node", - "additionalProperties": false, - "required": [ - "displayOrder", - "label", - "description", - "type" - ], - "properties": { - "displayOrder": { - "type": "number", - "description": "use this to numerically sort the properties for display", - "examples": [ - 1, - -0.2 - ] - }, - "label": { - "type": "string", - "description": "short name for the property", - "examples": [ - "Age" - ] - }, - "description": { - "type": "string", - "description": "description of the property", - "examples": [ - "Age in seconds since 1970" - ] - }, - "type": { - "type": "string", - "pattern": "^(number|integer|boolean|string|ref_contentSchema|data:[^/\\s,]+/[^/\\s,]+)$", - "description": "data type expected on this output", - "examples": [ - "number", - "integer", - "boolean", - "string", - "data:application/json", - "data:application/vnd.ms-excel ", - "data:text/plain", - "data:application/hdf5" - ] - }, - "contentSchema": { - "title": "Content Schema", - "description": "jsonschema of this input/output. Required when type='ref_contentSchema'", - "type": "object" - }, - "fileToKeyMap": { - "description": "Place the data stored in the named files and store it in the locations pointed to by the respective output key.", - "type": "object", - "patternProperties": { - ".+": { - "type": "string", - "pattern": "^[-_a-zA-Z0-9]+$" - } - }, - "examples": [ - { - "dir/input1.txt": "key_1", - "dir33/input2.txt": "key2" - } - ] - }, - "unit": { - "title": "Unit", - "description": "Units of the output value, if a physical quantity", - "type": "string" - } - } - } - } - }, - "boot-options": { - "title": "Boot Options", - "description": "Service defined boot options. These get injected in the service as env variables.", - "type": "object", - "patternProperties": { - "^[_a-zA-Z0-9]+$": { - "title": "BootOptionMode", - "type": "object", - "properties": { - "label": { - "title": "Label", - "type": "string" - }, - "description": { - "title": "Description", - "type": "string" - }, - "default": { - "title": "Default", - "type": "string" - }, - "items": { - "title": "Items", - "type": "object", - "additionalProperties": { - "title": "BootOptionItem", - "type": "object", - "properties": { - "label": { - "title": "Label", - "type": "string" - }, - "description": { - "title": "Description", - "type": "string" - } - }, - "required": [ - "label", - "description" - ] - } - } - }, - "required": [ - "label", - "description", - "default", - "items" - ] - } - } - } - } -} diff --git a/services/web/server/src/simcore_service_webserver/api/v0/schemas/project-v0.0.1-pydantic.json b/services/web/server/src/simcore_service_webserver/api/v0/schemas/project-v0.0.1-pydantic.json new file mode 100644 index 00000000000..91a645e4a7a --- /dev/null +++ b/services/web/server/src/simcore_service_webserver/api/v0/schemas/project-v0.0.1-pydantic.json @@ -0,0 +1,2724 @@ +{ + "title": "osparc-simcore project", + "type": "object", + "properties": { + "uuid": { + "title": "Uuid", + "description": "project unique identifier", + "examples": [ + "07640335-a91f-468c-ab69-a374fa82078d", + "9bcf8feb-c1b1-41b6-b201-639cd6ccdba8" + ], + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "description": "project name", + "examples": [ + "Temporal Distortion Simulator" + ], + "type": "string" + }, + "description": { + "title": "Description", + "description": "longer one-line description about the project", + "examples": [ + "Dabbling in temporal transitions ..." + ], + "type": "string" + }, + "thumbnail": { + "title": "Thumbnail", + "description": "url of the project thumbnail", + "examples": [ + "https://placeimg.com/171/96/tech/grayscale/?0.jpg" + ], + "minLength": 0, + "maxLength": 2083, + "format": "uri", + "type": "string" + }, + "creationDate": { + "title": "Creationdate", + "description": "project creation date", + "pattern": "\\d{4}-(12|11|10|0?[1-9])-(31|30|[0-2]?\\d)T(2[0-3]|1\\d|0?[0-9])(:(\\d|[0-5]\\d)){2}(\\.\\d{3})?Z", + "examples": [ + "2018-07-01T11:13:43Z" + ], + "type": "string" + }, + "lastChangeDate": { + "title": "Lastchangedate", + "description": "last save date", + "pattern": "\\d{4}-(12|11|10|0?[1-9])-(31|30|[0-2]?\\d)T(2[0-3]|1\\d|0?[0-9])(:(\\d|[0-5]\\d)){2}(\\.\\d{3})?Z", + "examples": [ + "2018-07-01T11:13:43Z" + ], + "type": "string" + }, + "workbench": { + "title": "Workbench", + "description": "Project's pipeline", + "type": "object", + "patternProperties": { + "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$": { + "title": "Node", + "type": "object", + "properties": { + "key": { + "title": "Key", + "description": "distinctive name for the node based on the docker registry path", + "examples": [ + "simcore/services/comp/itis/sleeper", + "simcore/services/dynamic/3dviewer", + "simcore/services/frontend/file-picker" + ], + "pattern": "^(simcore)/(services)/(comp|dynamic|frontend)(/[\\w/-]+)+$", + "type": "string" + }, + "version": { + "title": "Version", + "description": "semantic version number of the node", + "examples": [ + "1.0.0", + "0.0.1" + ], + "pattern": "^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){2}(-(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*)(\\.(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*))*)?(\\+[-\\da-zA-Z]+(\\.[-\\da-zA-Z-]+)*)?$", + "type": "string" + }, + "label": { + "title": "Label", + "description": "The short name of the node", + "examples": [ + "JupyterLab" + ], + "type": "string" + }, + "progress": { + "title": "Progress", + "description": "the node progress value", + "minimum": 0, + "maximum": 100, + "type": "number" + }, + "thumbnail": { + "title": "Thumbnail", + "description": "url of the latest screenshot of the node", + "examples": [ + "https://placeimg.com/171/96/tech/grayscale/?0.jpg" + ], + "minLength": 0, + "maxLength": 2083, + "format": "uri", + "type": "string" + }, + "runHash": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "Runhash", + "description": "the hex digest of the resolved inputs +outputs hash at the time when the last outputs were generated", + "type": "string" + } + ] + }, + "inputs": { + "title": "Inputs", + "description": "values of input properties", + "type": "object", + "patternProperties": { + "^[-_a-zA-Z0-9]+$": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "string", + "format": "json-string" + }, + { + "type": "string" + }, + { + "title": "PortLink", + "description": "I/O port type to reference to an output port of another node in the same project", + "type": "object", + "properties": { + "nodeUuid": { + "title": "Nodeuuid", + "description": "The node to get the port output from", + "type": "string", + "format": "uuid" + }, + "output": { + "title": "Output", + "description": "The port key in the node given by nodeUuid", + "pattern": "^[-_a-zA-Z0-9]+$", + "type": "string" + } + }, + "required": [ + "nodeUuid", + "output" + ], + "additionalProperties": false, + "examples": [ + { + "nodeUuid": "da5068e0-8a8d-4fb9-9516-56e5ddaef15b", + "output": "out_2" + } + ] + }, + { + "title": "SimCoreFileLink", + "description": "I/O port type to hold a link to a file in simcore S3 storage", + "type": "object", + "properties": { + "store": { + "title": "Store", + "description": "The store identifier: 0 for simcore S3, 1 for datcore", + "type": "integer" + }, + "path": { + "title": "Path", + "description": "The path to the file in the storage provider domain", + "anyOf": [ + { + "type": "string", + "pattern": "^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\\/(.+)$" + }, + { + "type": "string", + "pattern": "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + } + ] + }, + "label": { + "title": "Label", + "description": "The real file name", + "type": "string" + }, + "eTag": { + "title": "Etag", + "description": "Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box).", + "type": "string" + }, + "dataset": { + "title": "Dataset", + "deprecated": true, + "type": "string" + } + }, + "required": [ + "store", + "path" + ], + "additionalProperties": false, + "examples": [ + { + "store": 0, + "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt", + "eTag": "859fda0cb82fc4acb4686510a172d9a9-1", + "label": "input.txt" + }, + { + "store": "0", + "path": "50339632-ee1d-11ec-a0c2-02420a0194e4/23b1522f-225f-5a4c-9158-c4c19a70d4a8/output.h5", + "eTag": "f7e4c7076761a42a871e978c8691c676" + }, + { + "store": 0, + "path": "api/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt" + }, + { + "store": 0, + "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/d4442ca4-23fd-5b6b-ba6d-0b75f711c109/y_1D.txt" + } + ] + }, + { + "title": "DatCoreFileLink", + "description": "I/O port type to hold a link to a file in DATCORE storage", + "type": "object", + "properties": { + "store": { + "title": "Store", + "description": "The store identifier: 0 for simcore S3, 1 for datcore", + "type": "integer" + }, + "path": { + "title": "Path", + "description": "The path to the file in the storage provider domain", + "anyOf": [ + { + "type": "string", + "pattern": "^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\\/(.+)$" + }, + { + "type": "string", + "pattern": "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + } + ] + }, + "label": { + "title": "Label", + "description": "The real file name", + "type": "string" + }, + "eTag": { + "title": "Etag", + "description": "Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box).", + "type": "string" + }, + "dataset": { + "title": "Dataset", + "description": "Unique identifier to access the dataset on datcore (REQUIRED for datcore)", + "type": "string" + } + }, + "required": [ + "store", + "path", + "label", + "dataset" + ], + "additionalProperties": false, + "examples": [ + { + "store": 1, + "dataset": "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4", + "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", + "label": "initial_WTstates" + }, + { + "store": 1, + "dataset": "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4", + "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", + "label": "initial_WTstates" + } + ] + }, + { + "title": "DownloadLink", + "description": "I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)", + "type": "object", + "properties": { + "downloadLink": { + "title": "Downloadlink", + "minLength": 1, + "maxLength": 65536, + "format": "uri", + "type": "string" + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "downloadLink" + ], + "additionalProperties": false, + "examples": [ + { + "downloadLink": "https://fakeimg.pl/250x100/" + } + ] + }, + { + "type": "array", + "items": {} + }, + { + "type": "object" + } + ] + } + } + }, + "inputsUnits": { + "title": "Inputsunits", + "description": "Overrides default unit (if any) defined in the service for each port", + "type": "object", + "patternProperties": { + "^[-_a-zA-Z0-9]+$": { + "type": "string" + } + } + }, + "inputAccess": { + "description": "map with key - access level pairs", + "type": "object", + "patternProperties": { + "^[-_a-zA-Z0-9]+$": { + "title": "AccessEnum", + "description": "An enumeration.", + "enum": [ + "ReadAndWrite", + "Invisible", + "ReadOnly" + ], + "type": "string" + } + } + }, + "inputNodes": { + "title": "Inputnodes", + "description": "node IDs of where the node is connected to", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "outputs": { + "title": "Outputs", + "description": "values of output properties", + "type": "object", + "patternProperties": { + "^[-_a-zA-Z0-9]+$": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "string", + "format": "json-string" + }, + { + "type": "string" + }, + { + "title": "SimCoreFileLink", + "description": "I/O port type to hold a link to a file in simcore S3 storage", + "type": "object", + "properties": { + "store": { + "title": "Store", + "description": "The store identifier: 0 for simcore S3, 1 for datcore", + "type": "integer" + }, + "path": { + "title": "Path", + "description": "The path to the file in the storage provider domain", + "anyOf": [ + { + "type": "string", + "pattern": "^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\\/(.+)$" + }, + { + "type": "string", + "pattern": "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + } + ] + }, + "label": { + "title": "Label", + "description": "The real file name", + "type": "string" + }, + "eTag": { + "title": "Etag", + "description": "Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box).", + "type": "string" + }, + "dataset": { + "title": "Dataset", + "deprecated": true, + "type": "string" + } + }, + "required": [ + "store", + "path" + ], + "additionalProperties": false, + "examples": [ + { + "store": 0, + "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt", + "eTag": "859fda0cb82fc4acb4686510a172d9a9-1", + "label": "input.txt" + }, + { + "store": "0", + "path": "50339632-ee1d-11ec-a0c2-02420a0194e4/23b1522f-225f-5a4c-9158-c4c19a70d4a8/output.h5", + "eTag": "f7e4c7076761a42a871e978c8691c676" + }, + { + "store": 0, + "path": "api/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt" + }, + { + "store": 0, + "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/d4442ca4-23fd-5b6b-ba6d-0b75f711c109/y_1D.txt" + } + ] + }, + { + "title": "DatCoreFileLink", + "description": "I/O port type to hold a link to a file in DATCORE storage", + "type": "object", + "properties": { + "store": { + "title": "Store", + "description": "The store identifier: 0 for simcore S3, 1 for datcore", + "type": "integer" + }, + "path": { + "title": "Path", + "description": "The path to the file in the storage provider domain", + "anyOf": [ + { + "type": "string", + "pattern": "^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\\/(.+)$" + }, + { + "type": "string", + "pattern": "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + } + ] + }, + "label": { + "title": "Label", + "description": "The real file name", + "type": "string" + }, + "eTag": { + "title": "Etag", + "description": "Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box).", + "type": "string" + }, + "dataset": { + "title": "Dataset", + "description": "Unique identifier to access the dataset on datcore (REQUIRED for datcore)", + "type": "string" + } + }, + "required": [ + "store", + "path", + "label", + "dataset" + ], + "additionalProperties": false, + "examples": [ + { + "store": 1, + "dataset": "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4", + "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", + "label": "initial_WTstates" + }, + { + "store": 1, + "dataset": "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4", + "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", + "label": "initial_WTstates" + } + ] + }, + { + "title": "DownloadLink", + "description": "I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)", + "type": "object", + "properties": { + "downloadLink": { + "title": "Downloadlink", + "minLength": 1, + "maxLength": 65536, + "format": "uri", + "type": "string" + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "downloadLink" + ], + "additionalProperties": false, + "examples": [ + { + "downloadLink": "https://fakeimg.pl/250x100/" + } + ] + }, + { + "type": "array", + "items": {} + }, + { + "type": "object" + } + ] + } + } + }, + "outputNode": { + "title": "Outputnode", + "deprecated": true, + "type": "boolean" + }, + "outputNodes": { + "title": "Outputnodes", + "description": "Used in group-nodes. Node IDs of those connected to the output", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "parent": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "Parent", + "description": "Parent's (group-nodes') node ID s. Used to group", + "type": "string", + "format": "uuid" + } + ] + }, + "position": { + "title": "Position", + "description": "Use projects_ui.WorkbenchUI.position instead", + "deprecated": true, + "allOf": [ + { + "title": "Position", + "type": "object", + "properties": { + "x": { + "title": "X", + "description": "The x position", + "example": [ + "12" + ], + "type": "integer" + }, + "y": { + "title": "Y", + "description": "The y position", + "example": [ + "15" + ], + "type": "integer" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + ] + }, + "state": { + "title": "State", + "description": "The node's state object", + "allOf": [ + { + "title": "NodeState", + "type": "object", + "properties": { + "modified": { + "title": "Modified", + "description": "true if the node's outputs need to be re-computed", + "default": true, + "type": "boolean" + }, + "dependencies": { + "title": "Dependencies", + "description": "contains the node inputs dependencies if they need to be computed first", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "uniqueItems": true + }, + "currentStatus": { + "description": "the node's current state", + "default": "NOT_STARTED", + "allOf": [ + { + "title": "RunningState", + "description": "State of execution of a project's computational workflow\n\nSEE StateType for task state", + "enum": [ + "UNKNOWN", + "PUBLISHED", + "NOT_STARTED", + "PENDING", + "STARTED", + "RETRY", + "SUCCESS", + "FAILED", + "ABORTED" + ], + "type": "string" + } + ] + } + }, + "additionalProperties": false, + "examples": [ + { + "modified": true, + "dependencies": [], + "currentStatus": "NOT_STARTED" + }, + { + "modified": true, + "dependencies": [ + "42838344-03de-4ce2-8d93-589a5dcdfd05" + ], + "currentStatus": "ABORTED" + }, + { + "modified": false, + "dependencies": [], + "currentStatus": "SUCCESS" + } + ] + } + ] + }, + "bootOptions": { + "title": "Bootoptions", + "description": "Some services provide alternative parameters to be injected at boot time. The user selection should be stored here, and it will overwrite the services's defaults.", + "type": "object", + "patternProperties": { + "[a-zA-Z][a-azA-Z0-9_]*": { + "type": "string" + } + } + } + }, + "required": [ + "key", + "version", + "label" + ], + "additionalProperties": false + } + } + }, + "prjOwner": { + "title": "Prjowner", + "description": "user email", + "type": "string", + "format": "email" + }, + "accessRights": { + "title": "Accessrights", + "description": "object containing the GroupID as key and read/write/execution permissions as value", + "type": "object", + "patternProperties": { + "^\\S+$": { + "title": "AccessRights", + "type": "object", + "properties": { + "read": { + "title": "Read", + "description": "gives read access", + "type": "boolean" + }, + "write": { + "title": "Write", + "description": "gives write access", + "type": "boolean" + }, + "delete": { + "title": "Delete", + "description": "gives deletion rights", + "type": "boolean" + } + }, + "required": [ + "read", + "write", + "delete" + ], + "additionalProperties": false + } + } + }, + "tags": { + "title": "Tags", + "default": [], + "type": "array", + "items": { + "type": "integer" + } + }, + "classifiers": { + "title": "Classifiers", + "description": "Contains the reference to the project classifiers", + "examples": [ + "some:id:to:a:classifier" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "state": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "ProjectState", + "type": "object", + "properties": { + "locked": { + "title": "Locked", + "description": "The project lock state", + "allOf": [ + { + "title": "ProjectLocked", + "type": "object", + "properties": { + "value": { + "title": "Value", + "description": "True if the project is locked", + "type": "boolean" + }, + "owner": { + "title": "Owner", + "description": "If locked, the user that owns the lock", + "allOf": [ + { + "title": "Owner", + "type": "object", + "properties": { + "user_id": { + "title": "User Id", + "description": "Owner's identifier when registered in the user's database table", + "examples": [ + 2 + ], + "type": "integer" + }, + "first_name": { + "title": "First Name", + "description": "Owner first name", + "examples": [ + "John" + ], + "type": "string" + }, + "last_name": { + "title": "Last Name", + "description": "Owner last name", + "examples": [ + "Smith" + ], + "type": "string" + } + }, + "required": [ + "user_id", + "first_name", + "last_name" + ], + "additionalProperties": false + } + ] + }, + "status": { + "description": "The status of the project", + "allOf": [ + { + "title": "ProjectStatus", + "description": "An enumeration.", + "enum": [ + "CLOSED", + "CLOSING", + "CLONING", + "EXPORTING", + "OPENING", + "OPENED" + ], + "type": "string" + } + ] + } + }, + "required": [ + "value", + "status" + ], + "additionalProperties": false, + "examples": [ + { + "value": false, + "status": "CLOSED" + }, + { + "value": true, + "status": "OPENED", + "owner": { + "user_id": 123, + "first_name": "Johnny", + "last_name": "Cash" + } + } + ] + } + ] + }, + "state": { + "title": "State", + "description": "The project running state", + "allOf": [ + { + "title": "ProjectRunningState", + "type": "object", + "properties": { + "value": { + "description": "The running state of the project", + "examples": [ + "STARTED" + ], + "allOf": [ + { + "title": "RunningState", + "description": "State of execution of a project's computational workflow\n\nSEE StateType for task state", + "enum": [ + "UNKNOWN", + "PUBLISHED", + "NOT_STARTED", + "PENDING", + "STARTED", + "RETRY", + "SUCCESS", + "FAILED", + "ABORTED" + ], + "type": "string" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "locked", + "state" + ], + "additionalProperties": false + } + ] + }, + "ui": { + "title": "StudyUI", + "type": "object", + "properties": { + "workbench": { + "title": "Workbench", + "type": "object", + "patternProperties": { + "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$": { + "title": "WorkbenchUI", + "type": "object", + "properties": { + "position": { + "title": "Position", + "description": "The node position in the workbench", + "allOf": [ + { + "title": "Position", + "type": "object", + "properties": { + "x": { + "title": "X", + "description": "The x position", + "example": [ + "12" + ], + "type": "integer" + }, + "y": { + "title": "Y", + "description": "The y position", + "example": [ + "15" + ], + "type": "integer" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + ] + }, + "marker": { + "title": "Marker", + "type": "object", + "properties": { + "color": { + "title": "Color", + "type": "string", + "format": "color" + } + }, + "required": [ + "color" + ], + "additionalProperties": false + } + }, + "required": [ + "position" + ], + "additionalProperties": false + } + } + }, + "slideshow": { + "title": "Slideshow", + "type": "object", + "patternProperties": { + "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$": { + "title": "Slideshow", + "type": "object", + "properties": { + "position": { + "title": "Position", + "type": "integer" + }, + "instructions": { + "title": "Instructions", + "type": "string" + } + }, + "required": [ + "position" + ] + } + } + }, + "currentNodeId": { + "title": "Currentnodeid", + "type": "string", + "format": "uuid" + }, + "annotations": { + "title": "Annotations", + "type": "object", + "patternProperties": { + "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$": { + "title": "Annotation", + "type": "object", + "properties": { + "type": { + "title": "Type", + "enum": [ + "rect", + "text" + ], + "type": "string" + }, + "color": { + "title": "Color", + "type": "string", + "format": "color" + }, + "attributes": { + "title": "Attributes", + "description": "svg attributes", + "type": "object" + } + }, + "required": [ + "type", + "color", + "attributes" + ], + "additionalProperties": false, + "examples": [ + { + "type": "rect", + "color": "#FF0000", + "attributes": { + "x": 415, + "y": 100, + "width": 117, + "height": 26 + } + }, + { + "type": "text", + "color": "#0000FF", + "attributes": { + "x": 415, + "y": 100, + "text": "Hey!" + } + } + ] + } + } + } + } + }, + "quality": { + "title": "Quality", + "description": "stores the study quality assessment", + "default": {}, + "type": "object" + }, + "dev": { + "title": "Dev", + "description": "object used for development purposes only", + "type": "object" + } + }, + "required": [ + "uuid", + "name", + "description", + "thumbnail", + "creationDate", + "lastChangeDate", + "workbench", + "prjOwner", + "accessRights" + ], + "additionalProperties": false, + "definitions": { + "PortLink": { + "title": "PortLink", + "description": "I/O port type to reference to an output port of another node in the same project", + "type": "object", + "properties": { + "nodeUuid": { + "title": "Nodeuuid", + "description": "The node to get the port output from", + "type": "string", + "format": "uuid" + }, + "output": { + "title": "Output", + "description": "The port key in the node given by nodeUuid", + "pattern": "^[-_a-zA-Z0-9]+$", + "type": "string" + } + }, + "required": [ + "nodeUuid", + "output" + ], + "additionalProperties": false, + "examples": [ + { + "nodeUuid": "da5068e0-8a8d-4fb9-9516-56e5ddaef15b", + "output": "out_2" + } + ] + }, + "SimCoreFileLink": { + "title": "SimCoreFileLink", + "description": "I/O port type to hold a link to a file in simcore S3 storage", + "type": "object", + "properties": { + "store": { + "title": "Store", + "description": "The store identifier: 0 for simcore S3, 1 for datcore", + "type": "integer" + }, + "path": { + "title": "Path", + "description": "The path to the file in the storage provider domain", + "anyOf": [ + { + "type": "string", + "pattern": "^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\\/(.+)$" + }, + { + "type": "string", + "pattern": "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + } + ] + }, + "label": { + "title": "Label", + "description": "The real file name", + "type": "string" + }, + "eTag": { + "title": "Etag", + "description": "Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box).", + "type": "string" + }, + "dataset": { + "title": "Dataset", + "deprecated": true, + "type": "string" + } + }, + "required": [ + "store", + "path" + ], + "additionalProperties": false, + "examples": [ + { + "store": 0, + "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt", + "eTag": "859fda0cb82fc4acb4686510a172d9a9-1", + "label": "input.txt" + }, + { + "store": "0", + "path": "50339632-ee1d-11ec-a0c2-02420a0194e4/23b1522f-225f-5a4c-9158-c4c19a70d4a8/output.h5", + "eTag": "f7e4c7076761a42a871e978c8691c676" + }, + { + "store": 0, + "path": "api/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt" + }, + { + "store": 0, + "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/d4442ca4-23fd-5b6b-ba6d-0b75f711c109/y_1D.txt" + } + ] + }, + "DatCoreFileLink": { + "title": "DatCoreFileLink", + "description": "I/O port type to hold a link to a file in DATCORE storage", + "type": "object", + "properties": { + "store": { + "title": "Store", + "description": "The store identifier: 0 for simcore S3, 1 for datcore", + "type": "integer" + }, + "path": { + "title": "Path", + "description": "The path to the file in the storage provider domain", + "anyOf": [ + { + "type": "string", + "pattern": "^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\\/(.+)$" + }, + { + "type": "string", + "pattern": "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + } + ] + }, + "label": { + "title": "Label", + "description": "The real file name", + "type": "string" + }, + "eTag": { + "title": "Etag", + "description": "Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box).", + "type": "string" + }, + "dataset": { + "title": "Dataset", + "description": "Unique identifier to access the dataset on datcore (REQUIRED for datcore)", + "type": "string" + } + }, + "required": [ + "store", + "path", + "label", + "dataset" + ], + "additionalProperties": false, + "examples": [ + { + "store": 1, + "dataset": "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4", + "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", + "label": "initial_WTstates" + }, + { + "store": 1, + "dataset": "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4", + "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", + "label": "initial_WTstates" + } + ] + }, + "DownloadLink": { + "title": "DownloadLink", + "description": "I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)", + "type": "object", + "properties": { + "downloadLink": { + "title": "Downloadlink", + "minLength": 1, + "maxLength": 65536, + "format": "uri", + "type": "string" + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "downloadLink" + ], + "additionalProperties": false, + "examples": [ + { + "downloadLink": "https://fakeimg.pl/250x100/" + } + ] + }, + "AccessEnum": { + "title": "AccessEnum", + "description": "An enumeration.", + "enum": [ + "ReadAndWrite", + "Invisible", + "ReadOnly" + ], + "type": "string" + }, + "Position": { + "title": "Position", + "type": "object", + "properties": { + "x": { + "title": "X", + "description": "The x position", + "example": [ + "12" + ], + "type": "integer" + }, + "y": { + "title": "Y", + "description": "The y position", + "example": [ + "15" + ], + "type": "integer" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "RunningState": { + "title": "RunningState", + "description": "State of execution of a project's computational workflow\n\nSEE StateType for task state", + "enum": [ + "UNKNOWN", + "PUBLISHED", + "NOT_STARTED", + "PENDING", + "STARTED", + "RETRY", + "SUCCESS", + "FAILED", + "ABORTED" + ], + "type": "string" + }, + "NodeState": { + "title": "NodeState", + "type": "object", + "properties": { + "modified": { + "title": "Modified", + "description": "true if the node's outputs need to be re-computed", + "default": true, + "type": "boolean" + }, + "dependencies": { + "title": "Dependencies", + "description": "contains the node inputs dependencies if they need to be computed first", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "uniqueItems": true + }, + "currentStatus": { + "description": "the node's current state", + "default": "NOT_STARTED", + "allOf": [ + { + "title": "RunningState", + "description": "State of execution of a project's computational workflow\n\nSEE StateType for task state", + "enum": [ + "UNKNOWN", + "PUBLISHED", + "NOT_STARTED", + "PENDING", + "STARTED", + "RETRY", + "SUCCESS", + "FAILED", + "ABORTED" + ], + "type": "string" + } + ] + } + }, + "additionalProperties": false, + "examples": [ + { + "modified": true, + "dependencies": [], + "currentStatus": "NOT_STARTED" + }, + { + "modified": true, + "dependencies": [ + "42838344-03de-4ce2-8d93-589a5dcdfd05" + ], + "currentStatus": "ABORTED" + }, + { + "modified": false, + "dependencies": [], + "currentStatus": "SUCCESS" + } + ] + }, + "Node": { + "title": "Node", + "type": "object", + "properties": { + "key": { + "title": "Key", + "description": "distinctive name for the node based on the docker registry path", + "examples": [ + "simcore/services/comp/itis/sleeper", + "simcore/services/dynamic/3dviewer", + "simcore/services/frontend/file-picker" + ], + "pattern": "^(simcore)/(services)/(comp|dynamic|frontend)(/[\\w/-]+)+$", + "type": "string" + }, + "version": { + "title": "Version", + "description": "semantic version number of the node", + "examples": [ + "1.0.0", + "0.0.1" + ], + "pattern": "^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){2}(-(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*)(\\.(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*))*)?(\\+[-\\da-zA-Z]+(\\.[-\\da-zA-Z-]+)*)?$", + "type": "string" + }, + "label": { + "title": "Label", + "description": "The short name of the node", + "examples": [ + "JupyterLab" + ], + "type": "string" + }, + "progress": { + "title": "Progress", + "description": "the node progress value", + "minimum": 0, + "maximum": 100, + "type": "number" + }, + "thumbnail": { + "title": "Thumbnail", + "description": "url of the latest screenshot of the node", + "examples": [ + "https://placeimg.com/171/96/tech/grayscale/?0.jpg" + ], + "minLength": 0, + "maxLength": 2083, + "format": "uri", + "type": "string" + }, + "runHash": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "Runhash", + "description": "the hex digest of the resolved inputs +outputs hash at the time when the last outputs were generated", + "type": "string" + } + ] + }, + "inputs": { + "title": "Inputs", + "description": "values of input properties", + "type": "object", + "patternProperties": { + "^[-_a-zA-Z0-9]+$": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "string", + "format": "json-string" + }, + { + "type": "string" + }, + { + "title": "PortLink", + "description": "I/O port type to reference to an output port of another node in the same project", + "type": "object", + "properties": { + "nodeUuid": { + "title": "Nodeuuid", + "description": "The node to get the port output from", + "type": "string", + "format": "uuid" + }, + "output": { + "title": "Output", + "description": "The port key in the node given by nodeUuid", + "pattern": "^[-_a-zA-Z0-9]+$", + "type": "string" + } + }, + "required": [ + "nodeUuid", + "output" + ], + "additionalProperties": false, + "examples": [ + { + "nodeUuid": "da5068e0-8a8d-4fb9-9516-56e5ddaef15b", + "output": "out_2" + } + ] + }, + { + "title": "SimCoreFileLink", + "description": "I/O port type to hold a link to a file in simcore S3 storage", + "type": "object", + "properties": { + "store": { + "title": "Store", + "description": "The store identifier: 0 for simcore S3, 1 for datcore", + "type": "integer" + }, + "path": { + "title": "Path", + "description": "The path to the file in the storage provider domain", + "anyOf": [ + { + "type": "string", + "pattern": "^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\\/(.+)$" + }, + { + "type": "string", + "pattern": "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + } + ] + }, + "label": { + "title": "Label", + "description": "The real file name", + "type": "string" + }, + "eTag": { + "title": "Etag", + "description": "Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box).", + "type": "string" + }, + "dataset": { + "title": "Dataset", + "deprecated": true, + "type": "string" + } + }, + "required": [ + "store", + "path" + ], + "additionalProperties": false, + "examples": [ + { + "store": 0, + "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt", + "eTag": "859fda0cb82fc4acb4686510a172d9a9-1", + "label": "input.txt" + }, + { + "store": "0", + "path": "50339632-ee1d-11ec-a0c2-02420a0194e4/23b1522f-225f-5a4c-9158-c4c19a70d4a8/output.h5", + "eTag": "f7e4c7076761a42a871e978c8691c676" + }, + { + "store": 0, + "path": "api/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt" + }, + { + "store": 0, + "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/d4442ca4-23fd-5b6b-ba6d-0b75f711c109/y_1D.txt" + } + ] + }, + { + "title": "DatCoreFileLink", + "description": "I/O port type to hold a link to a file in DATCORE storage", + "type": "object", + "properties": { + "store": { + "title": "Store", + "description": "The store identifier: 0 for simcore S3, 1 for datcore", + "type": "integer" + }, + "path": { + "title": "Path", + "description": "The path to the file in the storage provider domain", + "anyOf": [ + { + "type": "string", + "pattern": "^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\\/(.+)$" + }, + { + "type": "string", + "pattern": "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + } + ] + }, + "label": { + "title": "Label", + "description": "The real file name", + "type": "string" + }, + "eTag": { + "title": "Etag", + "description": "Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box).", + "type": "string" + }, + "dataset": { + "title": "Dataset", + "description": "Unique identifier to access the dataset on datcore (REQUIRED for datcore)", + "type": "string" + } + }, + "required": [ + "store", + "path", + "label", + "dataset" + ], + "additionalProperties": false, + "examples": [ + { + "store": 1, + "dataset": "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4", + "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", + "label": "initial_WTstates" + }, + { + "store": 1, + "dataset": "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4", + "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", + "label": "initial_WTstates" + } + ] + }, + { + "title": "DownloadLink", + "description": "I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)", + "type": "object", + "properties": { + "downloadLink": { + "title": "Downloadlink", + "minLength": 1, + "maxLength": 65536, + "format": "uri", + "type": "string" + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "downloadLink" + ], + "additionalProperties": false, + "examples": [ + { + "downloadLink": "https://fakeimg.pl/250x100/" + } + ] + }, + { + "type": "array", + "items": {} + }, + { + "type": "object" + } + ] + } + } + }, + "inputsUnits": { + "title": "Inputsunits", + "description": "Overrides default unit (if any) defined in the service for each port", + "type": "object", + "patternProperties": { + "^[-_a-zA-Z0-9]+$": { + "type": "string" + } + } + }, + "inputAccess": { + "description": "map with key - access level pairs", + "type": "object", + "patternProperties": { + "^[-_a-zA-Z0-9]+$": { + "title": "AccessEnum", + "description": "An enumeration.", + "enum": [ + "ReadAndWrite", + "Invisible", + "ReadOnly" + ], + "type": "string" + } + } + }, + "inputNodes": { + "title": "Inputnodes", + "description": "node IDs of where the node is connected to", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "outputs": { + "title": "Outputs", + "description": "values of output properties", + "type": "object", + "patternProperties": { + "^[-_a-zA-Z0-9]+$": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "string", + "format": "json-string" + }, + { + "type": "string" + }, + { + "title": "SimCoreFileLink", + "description": "I/O port type to hold a link to a file in simcore S3 storage", + "type": "object", + "properties": { + "store": { + "title": "Store", + "description": "The store identifier: 0 for simcore S3, 1 for datcore", + "type": "integer" + }, + "path": { + "title": "Path", + "description": "The path to the file in the storage provider domain", + "anyOf": [ + { + "type": "string", + "pattern": "^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\\/(.+)$" + }, + { + "type": "string", + "pattern": "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + } + ] + }, + "label": { + "title": "Label", + "description": "The real file name", + "type": "string" + }, + "eTag": { + "title": "Etag", + "description": "Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box).", + "type": "string" + }, + "dataset": { + "title": "Dataset", + "deprecated": true, + "type": "string" + } + }, + "required": [ + "store", + "path" + ], + "additionalProperties": false, + "examples": [ + { + "store": 0, + "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt", + "eTag": "859fda0cb82fc4acb4686510a172d9a9-1", + "label": "input.txt" + }, + { + "store": "0", + "path": "50339632-ee1d-11ec-a0c2-02420a0194e4/23b1522f-225f-5a4c-9158-c4c19a70d4a8/output.h5", + "eTag": "f7e4c7076761a42a871e978c8691c676" + }, + { + "store": 0, + "path": "api/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt" + }, + { + "store": 0, + "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/d4442ca4-23fd-5b6b-ba6d-0b75f711c109/y_1D.txt" + } + ] + }, + { + "title": "DatCoreFileLink", + "description": "I/O port type to hold a link to a file in DATCORE storage", + "type": "object", + "properties": { + "store": { + "title": "Store", + "description": "The store identifier: 0 for simcore S3, 1 for datcore", + "type": "integer" + }, + "path": { + "title": "Path", + "description": "The path to the file in the storage provider domain", + "anyOf": [ + { + "type": "string", + "pattern": "^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\\/(.+)$" + }, + { + "type": "string", + "pattern": "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + } + ] + }, + "label": { + "title": "Label", + "description": "The real file name", + "type": "string" + }, + "eTag": { + "title": "Etag", + "description": "Entity tag that uniquely represents the file. The method to generate the tag is not specified (black box).", + "type": "string" + }, + "dataset": { + "title": "Dataset", + "description": "Unique identifier to access the dataset on datcore (REQUIRED for datcore)", + "type": "string" + } + }, + "required": [ + "store", + "path", + "label", + "dataset" + ], + "additionalProperties": false, + "examples": [ + { + "store": 1, + "dataset": "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4", + "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", + "label": "initial_WTstates" + }, + { + "store": 1, + "dataset": "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4", + "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", + "label": "initial_WTstates" + } + ] + }, + { + "title": "DownloadLink", + "description": "I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)", + "type": "object", + "properties": { + "downloadLink": { + "title": "Downloadlink", + "minLength": 1, + "maxLength": 65536, + "format": "uri", + "type": "string" + }, + "label": { + "title": "Label", + "type": "string" + } + }, + "required": [ + "downloadLink" + ], + "additionalProperties": false, + "examples": [ + { + "downloadLink": "https://fakeimg.pl/250x100/" + } + ] + }, + { + "type": "array", + "items": {} + }, + { + "type": "object" + } + ] + } + } + }, + "outputNode": { + "title": "Outputnode", + "deprecated": true, + "type": "boolean" + }, + "outputNodes": { + "title": "Outputnodes", + "description": "Used in group-nodes. Node IDs of those connected to the output", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "parent": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "Parent", + "description": "Parent's (group-nodes') node ID s. Used to group", + "type": "string", + "format": "uuid" + } + ] + }, + "position": { + "title": "Position", + "description": "Use projects_ui.WorkbenchUI.position instead", + "deprecated": true, + "allOf": [ + { + "title": "Position", + "type": "object", + "properties": { + "x": { + "title": "X", + "description": "The x position", + "example": [ + "12" + ], + "type": "integer" + }, + "y": { + "title": "Y", + "description": "The y position", + "example": [ + "15" + ], + "type": "integer" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + ] + }, + "state": { + "title": "State", + "description": "The node's state object", + "allOf": [ + { + "title": "NodeState", + "type": "object", + "properties": { + "modified": { + "title": "Modified", + "description": "true if the node's outputs need to be re-computed", + "default": true, + "type": "boolean" + }, + "dependencies": { + "title": "Dependencies", + "description": "contains the node inputs dependencies if they need to be computed first", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "uniqueItems": true + }, + "currentStatus": { + "description": "the node's current state", + "default": "NOT_STARTED", + "allOf": [ + { + "title": "RunningState", + "description": "State of execution of a project's computational workflow\n\nSEE StateType for task state", + "enum": [ + "UNKNOWN", + "PUBLISHED", + "NOT_STARTED", + "PENDING", + "STARTED", + "RETRY", + "SUCCESS", + "FAILED", + "ABORTED" + ], + "type": "string" + } + ] + } + }, + "additionalProperties": false, + "examples": [ + { + "modified": true, + "dependencies": [], + "currentStatus": "NOT_STARTED" + }, + { + "modified": true, + "dependencies": [ + "42838344-03de-4ce2-8d93-589a5dcdfd05" + ], + "currentStatus": "ABORTED" + }, + { + "modified": false, + "dependencies": [], + "currentStatus": "SUCCESS" + } + ] + } + ] + }, + "bootOptions": { + "title": "Bootoptions", + "description": "Some services provide alternative parameters to be injected at boot time. The user selection should be stored here, and it will overwrite the services's defaults.", + "type": "object", + "patternProperties": { + "[a-zA-Z][a-azA-Z0-9_]*": { + "type": "string" + } + } + } + }, + "required": [ + "key", + "version", + "label" + ], + "additionalProperties": false + }, + "AccessRights": { + "title": "AccessRights", + "type": "object", + "properties": { + "read": { + "title": "Read", + "description": "gives read access", + "type": "boolean" + }, + "write": { + "title": "Write", + "description": "gives write access", + "type": "boolean" + }, + "delete": { + "title": "Delete", + "description": "gives deletion rights", + "type": "boolean" + } + }, + "required": [ + "read", + "write", + "delete" + ], + "additionalProperties": false + }, + "Owner": { + "title": "Owner", + "type": "object", + "properties": { + "user_id": { + "title": "User Id", + "description": "Owner's identifier when registered in the user's database table", + "examples": [ + 2 + ], + "type": "integer" + }, + "first_name": { + "title": "First Name", + "description": "Owner first name", + "examples": [ + "John" + ], + "type": "string" + }, + "last_name": { + "title": "Last Name", + "description": "Owner last name", + "examples": [ + "Smith" + ], + "type": "string" + } + }, + "required": [ + "user_id", + "first_name", + "last_name" + ], + "additionalProperties": false + }, + "ProjectStatus": { + "title": "ProjectStatus", + "description": "An enumeration.", + "enum": [ + "CLOSED", + "CLOSING", + "CLONING", + "EXPORTING", + "OPENING", + "OPENED" + ], + "type": "string" + }, + "ProjectLocked": { + "title": "ProjectLocked", + "type": "object", + "properties": { + "value": { + "title": "Value", + "description": "True if the project is locked", + "type": "boolean" + }, + "owner": { + "title": "Owner", + "description": "If locked, the user that owns the lock", + "allOf": [ + { + "title": "Owner", + "type": "object", + "properties": { + "user_id": { + "title": "User Id", + "description": "Owner's identifier when registered in the user's database table", + "examples": [ + 2 + ], + "type": "integer" + }, + "first_name": { + "title": "First Name", + "description": "Owner first name", + "examples": [ + "John" + ], + "type": "string" + }, + "last_name": { + "title": "Last Name", + "description": "Owner last name", + "examples": [ + "Smith" + ], + "type": "string" + } + }, + "required": [ + "user_id", + "first_name", + "last_name" + ], + "additionalProperties": false + } + ] + }, + "status": { + "description": "The status of the project", + "allOf": [ + { + "title": "ProjectStatus", + "description": "An enumeration.", + "enum": [ + "CLOSED", + "CLOSING", + "CLONING", + "EXPORTING", + "OPENING", + "OPENED" + ], + "type": "string" + } + ] + } + }, + "required": [ + "value", + "status" + ], + "additionalProperties": false, + "examples": [ + { + "value": false, + "status": "CLOSED" + }, + { + "value": true, + "status": "OPENED", + "owner": { + "user_id": 123, + "first_name": "Johnny", + "last_name": "Cash" + } + } + ] + }, + "ProjectRunningState": { + "title": "ProjectRunningState", + "type": "object", + "properties": { + "value": { + "description": "The running state of the project", + "examples": [ + "STARTED" + ], + "allOf": [ + { + "title": "RunningState", + "description": "State of execution of a project's computational workflow\n\nSEE StateType for task state", + "enum": [ + "UNKNOWN", + "PUBLISHED", + "NOT_STARTED", + "PENDING", + "STARTED", + "RETRY", + "SUCCESS", + "FAILED", + "ABORTED" + ], + "type": "string" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "ProjectState": { + "title": "ProjectState", + "type": "object", + "properties": { + "locked": { + "title": "Locked", + "description": "The project lock state", + "allOf": [ + { + "title": "ProjectLocked", + "type": "object", + "properties": { + "value": { + "title": "Value", + "description": "True if the project is locked", + "type": "boolean" + }, + "owner": { + "title": "Owner", + "description": "If locked, the user that owns the lock", + "allOf": [ + { + "title": "Owner", + "type": "object", + "properties": { + "user_id": { + "title": "User Id", + "description": "Owner's identifier when registered in the user's database table", + "examples": [ + 2 + ], + "type": "integer" + }, + "first_name": { + "title": "First Name", + "description": "Owner first name", + "examples": [ + "John" + ], + "type": "string" + }, + "last_name": { + "title": "Last Name", + "description": "Owner last name", + "examples": [ + "Smith" + ], + "type": "string" + } + }, + "required": [ + "user_id", + "first_name", + "last_name" + ], + "additionalProperties": false + } + ] + }, + "status": { + "description": "The status of the project", + "allOf": [ + { + "title": "ProjectStatus", + "description": "An enumeration.", + "enum": [ + "CLOSED", + "CLOSING", + "CLONING", + "EXPORTING", + "OPENING", + "OPENED" + ], + "type": "string" + } + ] + } + }, + "required": [ + "value", + "status" + ], + "additionalProperties": false, + "examples": [ + { + "value": false, + "status": "CLOSED" + }, + { + "value": true, + "status": "OPENED", + "owner": { + "user_id": 123, + "first_name": "Johnny", + "last_name": "Cash" + } + } + ] + } + ] + }, + "state": { + "title": "State", + "description": "The project running state", + "allOf": [ + { + "title": "ProjectRunningState", + "type": "object", + "properties": { + "value": { + "description": "The running state of the project", + "examples": [ + "STARTED" + ], + "allOf": [ + { + "title": "RunningState", + "description": "State of execution of a project's computational workflow\n\nSEE StateType for task state", + "enum": [ + "UNKNOWN", + "PUBLISHED", + "NOT_STARTED", + "PENDING", + "STARTED", + "RETRY", + "SUCCESS", + "FAILED", + "ABORTED" + ], + "type": "string" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "locked", + "state" + ], + "additionalProperties": false + }, + "Marker": { + "title": "Marker", + "type": "object", + "properties": { + "color": { + "title": "Color", + "type": "string", + "format": "color" + } + }, + "required": [ + "color" + ], + "additionalProperties": false + }, + "WorkbenchUI": { + "title": "WorkbenchUI", + "type": "object", + "properties": { + "position": { + "title": "Position", + "description": "The node position in the workbench", + "allOf": [ + { + "title": "Position", + "type": "object", + "properties": { + "x": { + "title": "X", + "description": "The x position", + "example": [ + "12" + ], + "type": "integer" + }, + "y": { + "title": "Y", + "description": "The y position", + "example": [ + "15" + ], + "type": "integer" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + ] + }, + "marker": { + "title": "Marker", + "type": "object", + "properties": { + "color": { + "title": "Color", + "type": "string", + "format": "color" + } + }, + "required": [ + "color" + ], + "additionalProperties": false + } + }, + "required": [ + "position" + ], + "additionalProperties": false + }, + "Slideshow": { + "title": "Slideshow", + "type": "object", + "properties": { + "position": { + "title": "Position", + "type": "integer" + }, + "instructions": { + "title": "Instructions", + "type": "string" + } + }, + "required": [ + "position" + ] + }, + "Annotation": { + "title": "Annotation", + "type": "object", + "properties": { + "type": { + "title": "Type", + "enum": [ + "rect", + "text" + ], + "type": "string" + }, + "color": { + "title": "Color", + "type": "string", + "format": "color" + }, + "attributes": { + "title": "Attributes", + "description": "svg attributes", + "type": "object" + } + }, + "required": [ + "type", + "color", + "attributes" + ], + "additionalProperties": false, + "examples": [ + { + "type": "rect", + "color": "#FF0000", + "attributes": { + "x": 415, + "y": 100, + "width": 117, + "height": 26 + } + }, + { + "type": "text", + "color": "#0000FF", + "attributes": { + "x": 415, + "y": 100, + "text": "Hey!" + } + } + ] + }, + "StudyUI": { + "title": "StudyUI", + "type": "object", + "properties": { + "workbench": { + "title": "Workbench", + "type": "object", + "patternProperties": { + "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$": { + "title": "WorkbenchUI", + "type": "object", + "properties": { + "position": { + "title": "Position", + "description": "The node position in the workbench", + "allOf": [ + { + "title": "Position", + "type": "object", + "properties": { + "x": { + "title": "X", + "description": "The x position", + "example": [ + "12" + ], + "type": "integer" + }, + "y": { + "title": "Y", + "description": "The y position", + "example": [ + "15" + ], + "type": "integer" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + ] + }, + "marker": { + "title": "Marker", + "type": "object", + "properties": { + "color": { + "title": "Color", + "type": "string", + "format": "color" + } + }, + "required": [ + "color" + ], + "additionalProperties": false + } + }, + "required": [ + "position" + ], + "additionalProperties": false + } + } + }, + "slideshow": { + "title": "Slideshow", + "type": "object", + "patternProperties": { + "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$": { + "title": "Slideshow", + "type": "object", + "properties": { + "position": { + "title": "Position", + "type": "integer" + }, + "instructions": { + "title": "Instructions", + "type": "string" + } + }, + "required": [ + "position" + ] + } + } + }, + "currentNodeId": { + "title": "Currentnodeid", + "type": "string", + "format": "uuid" + }, + "annotations": { + "title": "Annotations", + "type": "object", + "patternProperties": { + "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$": { + "title": "Annotation", + "type": "object", + "properties": { + "type": { + "title": "Type", + "enum": [ + "rect", + "text" + ], + "type": "string" + }, + "color": { + "title": "Color", + "type": "string", + "format": "color" + }, + "attributes": { + "title": "Attributes", + "description": "svg attributes", + "type": "object" + } + }, + "required": [ + "type", + "color", + "attributes" + ], + "additionalProperties": false, + "examples": [ + { + "type": "rect", + "color": "#FF0000", + "attributes": { + "x": 415, + "y": 100, + "width": 117, + "height": 26 + } + }, + { + "type": "text", + "color": "#0000FF", + "attributes": { + "x": 415, + "y": 100, + "text": "Hey!" + } + } + ] + } + } + } + } + } + } +} diff --git a/services/web/server/src/simcore_service_webserver/projects/project_models.py b/services/web/server/src/simcore_service_webserver/projects/project_models.py index ed1703ab80a..b18349ca9a4 100644 --- a/services/web/server/src/simcore_service_webserver/projects/project_models.py +++ b/services/web/server/src/simcore_service_webserver/projects/project_models.py @@ -1,6 +1,6 @@ import json from enum import Enum -from typing import Any, Dict, Optional, Tuple +from typing import Any, Optional from aiohttp import web from aiopg.sa.result import RowProxy @@ -10,7 +10,7 @@ from .._resources import resources # TODO: extend -ProjectDict = Dict[str, Any] +ProjectDict = dict[str, Any] ProjectProxy = RowProxy @@ -30,10 +30,19 @@ def to_project_type_db(cls, api_type: "ProjectTypeAPI") -> Optional[ProjectType] def setup_projects_model_schema(app: web.Application): # NOTE: inits once per app - # FIXME: schemas are hard-coded to api/V0!!! - with resources.stream("api/v0/schemas/project-v0.0.1.json") as fh: + with resources.stream("api/v0/schemas/project-v0.0.1-pydantic.json") as fh: project_schema = json.load(fh) + # WARNING: Mar.2023 During changing to pydantic generated json schema + # found out there was BUG in the previously used project-v0.0.1.json schema + # This is a temporary patch, until the bug is fixed. + # https://github.com/ITISFoundation/osparc-simcore/issues/3992 + # Tested in test_validate_project_json_schema() + project_schema["properties"]["workbench"].pop("patternProperties") + project_schema["properties"]["ui"]["properties"]["workbench"].pop( + "patternProperties" + ) + if app.get(APP_JSONSCHEMA_SPECS_KEY) is None: app[APP_JSONSCHEMA_SPECS_KEY] = {"projects": project_schema} @@ -43,7 +52,7 @@ def setup_projects_model_schema(app: web.Application): return app[APP_JSONSCHEMA_SPECS_KEY]["projects"] -__all__: Tuple[str, ...] = ( +__all__: tuple[str, ...] = ( "ProjectDict", "ProjectProxy", "setup_projects_model_schema", diff --git a/services/web/server/tests/unit/conftest.py b/services/web/server/tests/unit/conftest.py index 24361afdc04..8ea09377a2b 100644 --- a/services/web/server/tests/unit/conftest.py +++ b/services/web/server/tests/unit/conftest.py @@ -69,7 +69,7 @@ def factory(): @pytest.fixture def project_schema_file(api_version_prefix) -> Path: prj_schema_path = resources.get_path( - f"api/{api_version_prefix}/schemas/project-v0.0.1.json" + f"api/{api_version_prefix}/schemas/project-v0.0.1-pydantic.json" ) assert prj_schema_path.exists() return prj_schema_path diff --git a/services/web/server/tests/unit/isolated/data/project-data.json b/services/web/server/tests/unit/isolated/data/project-data.json new file mode 100644 index 00000000000..d57ad0e6f4b --- /dev/null +++ b/services/web/server/tests/unit/isolated/data/project-data.json @@ -0,0 +1,64 @@ +{ + "uuid": "e7cbead8-f2ff-476f-999c-d68eb4011918", + "name": "solvers/simcore%2Fservices%2Fcomp%2Fitis%2Fsleeper/releases/2.1.1/jobs/e7cbead8-f2ff-476f-999c-d68eb4011918", + "description": "Study associated to solver job:\n{\n \"id\": \"e7cbead8-f2ff-476f-999c-d68eb4011918\",\n \"name\": \"solvers/simcore%2Fservices%2Fcomp%2Fitis%2Fsleeper/releases/2.1.1/jobs/e7cbead8-f2ff-476f-999c-d68eb4011918\",\n \"inputs_checksum\": \"ab779fef37c800b6c012f1dcb0ea7c091036ba65faf2384460ab4a83a5dd948a\",\n \"created_at\": \"2023-03-19T06:55:13.455581\"\n}", + "thumbnail": "https://2xx2gy2ovf3r21jclkjio3x8-wpengine.netdna-ssl.com/wp-content/uploads/2018/12/API-Examples.jpg", + "creationDate": "2023-03-19T06:55:13.456Z", + "lastChangeDate": "2023-03-19T06:55:13.456Z", + "workbench": { + "6eb83026-f82b-5d95-96b0-b50daeee38ec": { + "key": "simcore/services/comp/itis/sleeper", + "version": "2.1.1", + "label": "sleeper", + "progress": null, + "thumbnail": null, + "runHash": null, + "inputs": { + "input_1": { + "store": 0, + "path": "api/7cab36a7-1efa-3541-920d-d1ba4806e2dc/file-with-number.txt", + "label": "file-with-number.txt", + "eTag": "c81e728d9d4c2f636f067f89cc14862c", + "dataset": null + }, + "input_2": 0.0, + "input_3": 0.0, + "input_4": 0.0 + }, + "inputsUnits": {}, + "inputAccess": null, + "inputNodes": [], + "outputs": {}, + "outputNode": null, + "outputNodes": null, + "parent": null, + "position": null, + "state": { + "modified": true, + "dependencies": [], + "currentStatus": "NOT_STARTED" + }, + "bootOptions": null + } + }, + "prjOwner": "api-placeholder@osparc.io", + "accessRights": {}, + "tags": [], + "classifiers": [], + "ui": { + "workbench": { + "6eb83026-f82b-5d95-96b0-b50daeee38ec": { + "position": { + "x": 633, + "y": 229 + }, + "marker": null + } + }, + "slideshow": {}, + "currentNodeId": "6eb83026-f82b-5d95-96b0-b50daeee38ec", + "annotations": {} + }, + "quality": {}, + "dev": {} +} diff --git a/services/web/server/tests/unit/isolated/test__json_schema.py b/services/web/server/tests/unit/isolated/test__json_schema.py new file mode 100644 index 00000000000..152302369d9 --- /dev/null +++ b/services/web/server/tests/unit/isolated/test__json_schema.py @@ -0,0 +1,44 @@ +import json +from pathlib import Path + +from servicelib.aiohttp import jsonschema_validation +from simcore_service_webserver._resources import resources + + +def test_validate_project_json_schema(): + CURRENT_DIR = Path(__file__).resolve().parent + + with open(CURRENT_DIR / "data/project-data.json") as f: + project = json.load(f) + + # NOTE: Mar.2023 Previous project-v0.0.1.json schema is passing validation + # even though it should fail. The reason is there is wrongly defined + # pattern properties in workbench which is ignored in practice. + # Current: "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?4[0-9a-fA-F]{3}-?[89abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$" + # Should be: "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + with resources.stream("api/v0/schemas/project-v0.0.1.json") as fh: + old_project_schema = json.load(fh) + assert jsonschema_validation.validate_instance(project, old_project_schema) is None + + # This is new Pydantic generated json schema, that was modified + # so it works as the previous one. This should be fixed in: + # https://github.com/ITISFoundation/osparc-simcore/issues/3992 + with resources.stream("api/v0/schemas/project-v0.0.1-pydantic.json") as fh: + new_project_schema = json.load(fh) + + assert new_project_schema["properties"]["workbench"]["patternProperties"][ + "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + ] + assert new_project_schema["properties"]["ui"]["properties"]["workbench"][ + "patternProperties" + ][ + "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + ] + + # We have to remove patternProperties from the schema, this is done + # here: setup_projects_model_schema() in projects_models.py until #3992 is fixed + new_project_schema["properties"]["workbench"].pop("patternProperties") + new_project_schema["properties"]["ui"]["properties"]["workbench"].pop( + "patternProperties" + ) + assert jsonschema_validation.validate_instance(project, new_project_schema) is None diff --git a/services/web/server/tests/unit/isolated/test_director_api.py b/services/web/server/tests/unit/isolated/test_director_api.py index 015810e768b..6535b038439 100644 --- a/services/web/server/tests/unit/isolated/test_director_api.py +++ b/services/web/server/tests/unit/isolated/test_director_api.py @@ -65,7 +65,8 @@ def registry_service_model_schema(osparc_simcore_root_dir: Path) -> dict: # https://github.com/ITISFoundation/osparc-simcore/tree/master/api/specs/common/schemas/node-meta-v0.0.1.json schema = json.loads( ( - osparc_simcore_root_dir / "api/specs/common/schemas/node-meta-v0.0.1.json" + osparc_simcore_root_dir + / "api/specs/common/schemas/node-meta-v0.0.1-pydantic.json" ).read_text() ) diff --git a/services/web/server/tests/unit/isolated/test_projects__project_models_rest.py b/services/web/server/tests/unit/isolated/test_projects__project_models_rest.py index 9c112f6da79..3996125fc0f 100644 --- a/services/web/server/tests/unit/isolated/test_projects__project_models_rest.py +++ b/services/web/server/tests/unit/isolated/test_projects__project_models_rest.py @@ -23,7 +23,7 @@ @pytest.fixture def project_jsonschema(): - with resources.stream(f"api/{API_VTAG}/schemas/project-v0.0.1.json") as fh: + with resources.stream(f"api/{API_VTAG}/schemas/project-v0.0.1-pydantic.json") as fh: return json.load(fh)