Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
285 changes: 285 additions & 0 deletions bundledApi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,285 @@
openapi: 3.0.1
info:
title: 3d-ops-trigger
description: Entry point for 3D operations — validates requests and triggers Jobnik jobs
version: 1.0.0
license:
name: MIT
url: https://opensource.org/licenses/MIT
security:
- {}
paths:
/records:
post:
operationId: createRecord
tags:
- records
summary: Invoke a new model ingestion flow
description: Validates the request (light & fast) and creates a Jobnik ingestion job.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ingestionPayload'
responses:
'201':
description: Ingestion job created
content:
application/json:
schema:
$ref: '#/components/schemas/jobResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/error'
/records/validate:
post:
operationId: validateRecord
tags:
- records
summary: Invoke a new model ingestion validation
description: Runs the full ingestion validation and returns the result without triggering a Jobnik job.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ingestionPayload'
responses:
'200':
description: Validation result
content:
application/json:
schema:
$ref: '#/components/schemas/validationResultResponse'
/records/canDelete/{recordId}:
get:
operationId: canDeleteRecord
tags:
- records
summary: Validate if a record can be removed
description: Runs the delete validation and returns the result without creating a job.
parameters:
- $ref: '#/components/parameters/recordId'
responses:
'200':
description: Validation result
content:
application/json:
schema:
$ref: '#/components/schemas/validationResultResponse'
/records/{recordId}:
delete:
operationId: deleteRecord
tags:
- records
summary: Delete a model by record id
description: Validates the record can be deleted and creates a Jobnik delete job.
parameters:
- $ref: '#/components/parameters/recordId'
responses:
'200':
description: Delete job created
content:
application/json:
schema:
$ref: '#/components/schemas/jobResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: Record not found
content:
application/json:
schema:
$ref: '#/components/schemas/error'
/metadata/{identifier}:
patch:
operationId: updateMetadata
tags:
- metadata
summary: Update metadata of a model
parameters:
- $ref: '#/components/parameters/identifier'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/updatePayload'
responses:
'200':
description: Metadata updated
content:
application/json:
schema:
$ref: '#/components/schemas/ackResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: Record not found
content:
application/json:
schema:
$ref: '#/components/schemas/error'
/metadata/status/{identifier}:
patch:
operationId: updateMetadataStatus
tags:
- metadata
summary: Update the publish/unpublish status of a model
parameters:
- $ref: '#/components/parameters/identifier'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/statusPayload'
responses:
'200':
description: Status updated
content:
application/json:
schema:
$ref: '#/components/schemas/ackResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: Record not found
content:
application/json:
schema:
$ref: '#/components/schemas/error'
/jobStatus/{jobId}:
get:
operationId: getJobStatus
tags:
- jobStatus
summary: Get the status and progress of a job
parameters:
- $ref: '#/components/parameters/jobId'
responses:
'200':
description: Job status
content:
application/json:
schema:
$ref: '#/components/schemas/jobStatusResponse'
'404':
description: Job not found
content:
application/json:
schema:
$ref: '#/components/schemas/error'
components:
parameters:
identifier:
name: identifier
in: path
required: true
description: The record identifier
schema:
type: string
recordId:
name: recordId
in: path
required: true
description: The record identifier
schema:
type: string
jobId:
name: jobId
in: path
required: true
description: The job identifier
schema:
type: string
schemas:
error:
type: object
required:
- message
properties:
message:
type: string
ingestionPayload:
type: object
required:
- modelPath
- tilesetFilename
- metadata
properties:
modelPath:
type: string
description: Path on the shared storage to the 3DTiles folder or 3TZ archive
tilesetFilename:
type: string
description: The tileset entry name (e.g. tileset.json)
metadata:
type: object
description: 3D record metadata (business validation applied downstream)
additionalProperties: true
updatePayload:
type: object
description: Partial metadata fields to update
additionalProperties: true
statusPayload:
type: object
required:
- status
properties:
status:
type: string
enum:
- PUBLISHED
- UNPUBLISHED
jobResponse:
type: object
required:
- jobId
- status
properties:
jobId:
type: string
status:
type: string
ackResponse:
type: object
required:
- message
properties:
message:
type: string
jobStatusResponse:
type: object
required:
- status
properties:
status:
type: string
percentage:
type: number
validationResultResponse:
type: object
required:
- isValid
properties:
isValid:
type: boolean
message:
type: string
4 changes: 3 additions & 1 deletion config/custom-environment-variables.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"externalServices": {
"catalog": "CATALOG_URL",
"extractable": "EXTRACTABLE_URL",
"lookupTables": {
"url": "LOOKUP_TABLES_URL",
"subUrl": "LOOKUP_TABLES_SUB_URL"
Expand All @@ -25,7 +26,8 @@
"percentageLimit": {
"__name": "VALIDATION_PERCENTAGE_LIMIT",
"__format": "number"
}
},
"basePath": "VALIDATION_BASE_PATH"
},
"provider": "PROVIDER_FROM",
"NFS": {
Expand Down
4 changes: 3 additions & 1 deletion config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
},
"externalServices": {
"catalog": "http://127.0.0.1:8080",
"extractable": "http://127.0.0.1:8080",
"lookupTables": {
"url": "http://127.0.0.1:8080",
"subUrl": "lookup-tables/lookupData"
Expand All @@ -53,7 +54,8 @@
}
},
"validation": {
"percentageLimit": 10
"percentageLimit": 10,
"basePath": "/app/models"
},
"provider": "NFS",
"NFS": {
Expand Down
2 changes: 2 additions & 0 deletions helm/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ data:
npm_config_cache: /tmp/
{{- with .Values.externalServices }}
CATALOG_URL: {{ .catalog | quote }}
EXTRACTABLE_URL: {{ .extractable | quote }}
{{- with .lookupTables }}
LOOKUP_TABLES_URL: {{ .url | quote }}
LOOKUP_TABLES_SUB_URL: {{ .subUrl | quote }}
Expand All @@ -46,6 +47,7 @@ data:
TASK_DELETE_TYPE: {{ .delete.taskType | quote }}
{{- end }}
VALIDATION_PERCENTAGE_LIMIT: {{ .Values.validation.percentageLimit | quote }}
VALIDATION_BASE_PATH: {{ .Values.validation.basePath | quote }}
PROVIDER_FROM: {{ .Values.provider | quote }}
{{- if eq .Values.provider "NFS" }}
PV_SOURCE_PATH: {{ .Values.NFS.pvPath | quote }}
Expand Down
2 changes: 2 additions & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ server:

externalServices:
catalog: ''
extractable: ''
lookupTables:
url: ''
subUrl: ''
Expand All @@ -96,6 +97,7 @@ jobManager:

validation:
percentageLimit: 10
basePath: ''

provider: 'NFS'
NFS:
Expand Down
Loading
Loading