diff --git a/.gitignore b/.gitignore index f39c4a0761..fb1aa6212e 100644 --- a/.gitignore +++ b/.gitignore @@ -166,3 +166,4 @@ orleans.codegen.cs .claude/settings.local.json CLAUDE.md AGENTS.md +/schemas/framework-api.json diff --git a/Directory.Packages.props b/Directory.Packages.props index 5490678bae..f1999a2d45 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -13,6 +13,7 @@ + @@ -23,6 +24,8 @@ + + @@ -51,9 +54,8 @@ - - + @@ -73,4 +75,4 @@ - + \ No newline at end of file diff --git a/MORYX-Framework.slnx b/MORYX-Framework.slnx index 59e3703ccb..38be555883 100644 --- a/MORYX-Framework.slnx +++ b/MORYX-Framework.slnx @@ -86,6 +86,7 @@ + @@ -186,5 +187,5 @@ - + \ No newline at end of file diff --git a/schemas/framework-api.yaml b/schemas/framework-api.yaml new file mode 100644 index 0000000000..fd4228804e --- /dev/null +++ b/schemas/framework-api.yaml @@ -0,0 +1,7802 @@ +openapi: 3.0.4 +info: + title: StartProject.Asp | v1 + version: 1.0.0 +paths: + /common/time: + get: + tags: + - Common + operationId: GetServerTime + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ServerTimeResponse' + /common/info/application: + get: + tags: + - Common + operationId: GetApplicationInfo + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ApplicationInformationResponse' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /common/info/system: + get: + tags: + - Common + operationId: GetHostInfo + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/HostInformationResponse' + /databases: + get: + tags: + - Database + operationId: GetAll + responses: + '200': + description: OK + content: + text/plain: + schema: + $ref: '#/components/schemas/DatabasesResponse' + application/json: + schema: + $ref: '#/components/schemas/DatabasesResponse' + text/json: + schema: + $ref: '#/components/schemas/DatabasesResponse' + delete: + tags: + - Database + operationId: EraseAll + responses: + '200': + description: OK + content: + text/plain: + schema: + $ref: '#/components/schemas/InvocationResponse' + application/json: + schema: + $ref: '#/components/schemas/InvocationResponse' + text/json: + schema: + $ref: '#/components/schemas/InvocationResponse' + '/databases/{targetModel}': + get: + tags: + - Database + operationId: GetModel + parameters: + - name: targetModel + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + content: + text/plain: + schema: + $ref: '#/components/schemas/DataModel' + application/json: + schema: + $ref: '#/components/schemas/DataModel' + text/json: + schema: + $ref: '#/components/schemas/DataModel' + delete: + tags: + - Database + operationId: EraseDatabase + parameters: + - name: targetModel + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatabaseConfigModel' + text/json: + schema: + $ref: '#/components/schemas/DatabaseConfigModel' + application/*+json: + schema: + $ref: '#/components/schemas/DatabaseConfigModel' + required: true + responses: + '200': + description: OK + content: + text/plain: + schema: + $ref: '#/components/schemas/InvocationResponse' + application/json: + schema: + $ref: '#/components/schemas/InvocationResponse' + text/json: + schema: + $ref: '#/components/schemas/InvocationResponse' + '/databases/{targetModel}/config': + post: + tags: + - Database + operationId: SetDatabaseConfig + parameters: + - name: targetModel + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatabaseConfigModel' + text/json: + schema: + $ref: '#/components/schemas/DatabaseConfigModel' + application/*+json: + schema: + $ref: '#/components/schemas/DatabaseConfigModel' + required: true + responses: + '200': + description: OK + content: + text/plain: + schema: + $ref: '#/components/schemas/DataModel' + application/json: + schema: + $ref: '#/components/schemas/DataModel' + text/json: + schema: + $ref: '#/components/schemas/DataModel' + '/databases/{targetModel}/config/test': + post: + tags: + - Database + operationId: TestDatabaseConfig + parameters: + - name: targetModel + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatabaseConfigModel' + text/json: + schema: + $ref: '#/components/schemas/DatabaseConfigModel' + application/*+json: + schema: + $ref: '#/components/schemas/DatabaseConfigModel' + required: true + responses: + '200': + description: OK + content: + text/plain: + schema: + $ref: '#/components/schemas/TestConnectionResponse' + application/json: + schema: + $ref: '#/components/schemas/TestConnectionResponse' + text/json: + schema: + $ref: '#/components/schemas/TestConnectionResponse' + /databases/createall: + post: + tags: + - Database + operationId: CreateAll + responses: + '200': + description: OK + content: + text/plain: + schema: + $ref: '#/components/schemas/InvocationResponse' + application/json: + schema: + $ref: '#/components/schemas/InvocationResponse' + text/json: + schema: + $ref: '#/components/schemas/InvocationResponse' + '/databases/{targetModel}/create': + post: + tags: + - Database + operationId: CreateDatabase + parameters: + - name: targetModel + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatabaseConfigModel' + text/json: + schema: + $ref: '#/components/schemas/DatabaseConfigModel' + application/*+json: + schema: + $ref: '#/components/schemas/DatabaseConfigModel' + required: true + responses: + '200': + description: OK + content: + text/plain: + schema: + $ref: '#/components/schemas/InvocationResponse' + application/json: + schema: + $ref: '#/components/schemas/InvocationResponse' + text/json: + schema: + $ref: '#/components/schemas/InvocationResponse' + '/databases/{targetModel}/migrate': + post: + tags: + - Database + operationId: MigrateDatabaseModel + parameters: + - name: targetModel + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatabaseConfigModel' + text/json: + schema: + $ref: '#/components/schemas/DatabaseConfigModel' + application/*+json: + schema: + $ref: '#/components/schemas/DatabaseConfigModel' + required: true + responses: + '200': + description: OK + content: + text/plain: + schema: + $ref: '#/components/schemas/DatabaseMigrationSummary' + application/json: + schema: + $ref: '#/components/schemas/DatabaseMigrationSummary' + text/json: + schema: + $ref: '#/components/schemas/DatabaseMigrationSummary' + '/databases/{targetModel}/setup': + post: + tags: + - Database + operationId: ExecuteSetup + parameters: + - name: targetModel + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExecuteSetupRequest' + text/json: + schema: + $ref: '#/components/schemas/ExecuteSetupRequest' + application/*+json: + schema: + $ref: '#/components/schemas/ExecuteSetupRequest' + required: true + responses: + '200': + description: OK + content: + text/plain: + schema: + $ref: '#/components/schemas/InvocationResponse' + application/json: + schema: + $ref: '#/components/schemas/InvocationResponse' + text/json: + schema: + $ref: '#/components/schemas/InvocationResponse' + /api/moryx/factory-monitor/state: + get: + tags: + - FactoryMonitor + operationId: InitialFactoryState + responses: + '200': + description: OK + content: + text/plain: + schema: + $ref: '#/components/schemas/FactoryStateModel' + application/json: + schema: + $ref: '#/components/schemas/FactoryStateModel' + text/json: + schema: + $ref: '#/components/schemas/FactoryStateModel' + /api/moryx/factory-monitor/cells: + get: + tags: + - FactoryMonitor + operationId: AllCells + responses: + '200': + description: OK + content: + text/plain: + schema: + type: array + items: + $ref: '#/components/schemas/VisualizableItemModel' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/VisualizableItemModel' + text/json: + schema: + type: array + items: + $ref: '#/components/schemas/VisualizableItemModel' + '/api/moryx/factory-monitor/factory-content/{factoryId}': + get: + tags: + - FactoryMonitor + operationId: FactoryContent + parameters: + - name: factoryId + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: OK + content: + text/plain: + schema: + type: array + items: + $ref: '#/components/schemas/VisualizableItemModel' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/VisualizableItemModel' + text/json: + schema: + type: array + items: + $ref: '#/components/schemas/VisualizableItemModel' + '/api/moryx/factory-monitor/navigation/{factoryId}': + get: + tags: + - FactoryMonitor + operationId: GetNavigation + parameters: + - name: factoryId + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: OK + content: + text/plain: + schema: + $ref: '#/components/schemas/FactoryModel' + application/json: + schema: + $ref: '#/components/schemas/FactoryModel' + text/json: + schema: + $ref: '#/components/schemas/FactoryModel' + /api/moryx/factory-monitor/state-stream: + get: + tags: + - FactoryMonitor + operationId: FactoryStatesStream + responses: + '200': + description: OK + content: + text/plain: + schema: + $ref: '#/components/schemas/OrderChangedModel' + application/json: + schema: + $ref: '#/components/schemas/OrderChangedModel' + text/json: + schema: + $ref: '#/components/schemas/OrderChangedModel' + /api/moryx/factory-monitor/move-cell: + post: + tags: + - FactoryMonitor + operationId: MoveCell + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CellLocationModel' + text/json: + schema: + $ref: '#/components/schemas/CellLocationModel' + application/*+json: + schema: + $ref: '#/components/schemas/CellLocationModel' + required: true + responses: + '200': + description: OK + content: + text/plain: + schema: + $ref: '#/components/schemas/CellLocationModel' + application/json: + schema: + $ref: '#/components/schemas/CellLocationModel' + text/json: + schema: + $ref: '#/components/schemas/CellLocationModel' + /api/moryx/factory-monitor/background: + post: + tags: + - FactoryMonitor + operationId: ChangeBackground + parameters: + - name: resourceId + in: query + schema: + type: integer + format: int64 + - name: url + in: query + schema: + type: string + responses: + '200': + description: OK + '404': + description: Not Found + content: + text/plain: + schema: + $ref: '#/components/schemas/ProblemDetails' + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '422': + description: Unprocessable Entity + content: + text/plain: + schema: + $ref: '#/components/schemas/ProblemDetails' + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '/api/moryx/factory-monitor/cell-properties/{identifier}': + get: + tags: + - FactoryMonitor + operationId: GetCellPropertiesSettings + parameters: + - name: identifier + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + content: + text/plain: + schema: + type: object + additionalProperties: + $ref: '#/components/schemas/CellPropertySettings' + application/json: + schema: + type: object + additionalProperties: + $ref: '#/components/schemas/CellPropertySettings' + text/json: + schema: + type: object + additionalProperties: + $ref: '#/components/schemas/CellPropertySettings' + '404': + description: Not Found + content: + text/plain: + schema: + $ref: '#/components/schemas/ProblemDetails' + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /api/moryx/factory-monitor/traceroute: + post: + tags: + - FactoryMonitor + operationId: TraceRoute + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransportRouteModel' + text/json: + schema: + $ref: '#/components/schemas/TransportRouteModel' + application/*+json: + schema: + $ref: '#/components/schemas/TransportRouteModel' + required: true + responses: + '200': + description: OK + '/api/moryx/factory-monitor/cell-settings/{id}': + put: + tags: + - FactoryMonitor + operationId: CellSettings + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CellSettingsModel' + text/json: + schema: + $ref: '#/components/schemas/CellSettingsModel' + application/*+json: + schema: + $ref: '#/components/schemas/CellSettingsModel' + required: true + responses: + '200': + description: OK + /api/moryx/factory-monitor/routes: + post: + tags: + - FactoryMonitor + operationId: GetRoutes + responses: + '200': + description: OK + content: + text/plain: + schema: + type: array + items: + $ref: '#/components/schemas/TransportRouteModel' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/TransportRouteModel' + text/json: + schema: + type: array + items: + $ref: '#/components/schemas/TransportRouteModel' + '/api/moryx/jobs/{jobId}': + get: + tags: + - JobManagement + operationId: GetJob + parameters: + - name: jobId + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/JobModel' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /api/moryx/jobs: + get: + tags: + - JobManagement + operationId: GetAll + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/JobModel' + '/api/moryx/jobs/{jobId}/complete': + post: + tags: + - JobManagement + operationId: Complete + parameters: + - name: jobId + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: OK + '/api/moryx/jobs/{jobId}/abort': + post: + tags: + - JobManagement + operationId: Abort + parameters: + - name: jobId + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: OK + /api/moryx/jobs/stream: + get: + tags: + - JobManagement + operationId: ProgressStream + responses: + '200': + description: OK + /api/moryx/media: + get: + tags: + - MediaServer + operationId: GetAll + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ContentDescriptorModel' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '/api/moryx/media/{guid}': + get: + tags: + - MediaServer + operationId: Get + parameters: + - name: guid + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ContentDescriptorModel' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + delete: + tags: + - MediaServer + operationId: RemoveContent + parameters: + - name: guid + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + '400': + description: Bad Request + content: + text/plain: + schema: + $ref: '#/components/schemas/ProblemDetails' + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + text/plain: + schema: + $ref: '#/components/schemas/ProblemDetails' + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '/api/moryx/media/{guid}/{variantName}': + get: + tags: + - MediaServer + operationId: GetVariant + parameters: + - name: guid + in: path + required: true + schema: + type: string + - name: variantName + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/VariantDescriptor' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + delete: + tags: + - MediaServer + operationId: RemoveVariant + parameters: + - name: guid + in: path + required: true + schema: + type: string + - name: variantName + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + '400': + description: Bad Request + content: + text/plain: + schema: + $ref: '#/components/schemas/ProblemDetails' + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + text/plain: + schema: + $ref: '#/components/schemas/ProblemDetails' + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '/api/moryx/media/{guid}/{variantName}/stream': + get: + tags: + - MediaServer + operationId: GetVariantStream + parameters: + - name: guid + in: path + required: true + schema: + type: string + - name: variantName + in: path + required: true + schema: + type: string + - name: preview + in: query + schema: + type: boolean + default: false + responses: + '400': + description: Bad Request + content: + text/plain: + schema: + $ref: '#/components/schemas/ProblemDetails' + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + text/plain: + schema: + $ref: '#/components/schemas/ProblemDetails' + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '200': + description: OK + content: + text/plain: + schema: + $ref: '#/components/schemas/FileStreamResult' + application/json: + schema: + $ref: '#/components/schemas/FileStreamResult' + text/json: + schema: + $ref: '#/components/schemas/FileStreamResult' + /api/moryx/media/master: + post: + tags: + - MediaServer + operationId: AddMaster + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + formFile: + $ref: '#/components/schemas/IFormFile' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + type: string + format: uuid + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '409': + description: Conflict + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '/api/moryx/media/{contentId}/{variantName}': + post: + tags: + - MediaServer + operationId: AddVariant + parameters: + - name: contentId + in: path + required: true + schema: + type: string + - name: variantName + in: path + required: true + schema: + type: string + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + formFile: + $ref: '#/components/schemas/IFormFile' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + type: string + format: uuid + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '409': + description: Conflict + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /modules/dependencies: + get: + tags: + - Modules + operationId: GetDependencyEvaluation + responses: + '200': + description: OK + content: + text/plain: + schema: + $ref: '#/components/schemas/DependencyEvaluation' + application/json: + schema: + $ref: '#/components/schemas/DependencyEvaluation' + text/json: + schema: + $ref: '#/components/schemas/DependencyEvaluation' + /modules: + get: + tags: + - Modules + operationId: GetAll + responses: + '200': + description: OK + content: + text/plain: + schema: + type: array + items: + $ref: '#/components/schemas/ServerModuleModel' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ServerModuleModel' + text/json: + schema: + type: array + items: + $ref: '#/components/schemas/ServerModuleModel' + '/modules/{moduleName}/healthstate': + get: + tags: + - Modules + operationId: HealthState + parameters: + - name: moduleName + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + content: + text/plain: + schema: + $ref: '#/components/schemas/ServerModuleState' + application/json: + schema: + $ref: '#/components/schemas/ServerModuleState' + text/json: + schema: + $ref: '#/components/schemas/ServerModuleState' + '404': + description: Not Found + content: + text/plain: + schema: + $ref: '#/components/schemas/ProblemDetails' + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '/modules/{moduleName}/notifications': + get: + tags: + - Modules + operationId: Notifications + parameters: + - name: moduleName + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + content: + text/plain: + schema: + type: array + items: + $ref: '#/components/schemas/ModuleNotificationModel' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ModuleNotificationModel' + text/json: + schema: + type: array + items: + $ref: '#/components/schemas/ModuleNotificationModel' + '404': + description: Not Found + content: + text/plain: + schema: + $ref: '#/components/schemas/ProblemDetails' + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '/modules/{moduleName}/start': + post: + tags: + - Modules + operationId: Start + parameters: + - name: moduleName + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + '404': + description: Not Found + content: + text/plain: + schema: + $ref: '#/components/schemas/ProblemDetails' + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '/modules/{moduleName}/stop': + post: + tags: + - Modules + operationId: Stop + parameters: + - name: moduleName + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + '404': + description: Not Found + content: + text/plain: + schema: + $ref: '#/components/schemas/ProblemDetails' + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '/modules/{moduleName}/reincarnate': + post: + tags: + - Modules + operationId: Reincarnate + parameters: + - name: moduleName + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + '404': + description: Not Found + content: + text/plain: + schema: + $ref: '#/components/schemas/ProblemDetails' + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '/modules/{moduleName}': + post: + tags: + - Modules + operationId: Update + parameters: + - name: moduleName + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ServerModuleModel' + text/json: + schema: + $ref: '#/components/schemas/ServerModuleModel' + application/*+json: + schema: + $ref: '#/components/schemas/ServerModuleModel' + required: true + responses: + '200': + description: OK + '400': + description: Bad Request + content: + text/plain: + schema: + $ref: '#/components/schemas/ProblemDetails' + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + text/plain: + schema: + $ref: '#/components/schemas/ProblemDetails' + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '/modules/{moduleName}/confirm': + post: + tags: + - Modules + operationId: ConfirmWarning + parameters: + - name: moduleName + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + '404': + description: Not Found + content: + text/plain: + schema: + $ref: '#/components/schemas/ProblemDetails' + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '/modules/{moduleName}/config': + get: + tags: + - Modules + operationId: GetConfig + parameters: + - name: moduleName + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + content: + text/plain: + schema: + $ref: '#/components/schemas/Config' + application/json: + schema: + $ref: '#/components/schemas/Config' + text/json: + schema: + $ref: '#/components/schemas/Config' + '404': + description: Not Found + content: + text/plain: + schema: + $ref: '#/components/schemas/ProblemDetails' + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '500': + description: Internal Server Error + post: + tags: + - Modules + operationId: SetConfig + parameters: + - name: moduleName + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SaveConfigRequest' + text/json: + schema: + $ref: '#/components/schemas/SaveConfigRequest' + application/*+json: + schema: + $ref: '#/components/schemas/SaveConfigRequest' + required: true + responses: + '200': + description: OK + '400': + description: Bad Request + content: + text/plain: + schema: + $ref: '#/components/schemas/ProblemDetails' + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + text/plain: + schema: + $ref: '#/components/schemas/ProblemDetails' + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '500': + description: Internal Server Error + '/modules/{moduleName}/console': + get: + tags: + - Modules + operationId: GetMethods + parameters: + - name: moduleName + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + content: + text/plain: + schema: + type: array + items: + $ref: '#/components/schemas/MethodEntry' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/MethodEntry' + text/json: + schema: + type: array + items: + $ref: '#/components/schemas/MethodEntry' + '404': + description: Not Found + content: + text/plain: + schema: + $ref: '#/components/schemas/ProblemDetails' + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + post: + tags: + - Modules + operationId: InvokeMethod + parameters: + - name: moduleName + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MethodEntry' + text/json: + schema: + $ref: '#/components/schemas/MethodEntry' + application/*+json: + schema: + $ref: '#/components/schemas/MethodEntry' + required: true + responses: + '200': + description: OK + content: + text/plain: + schema: + $ref: '#/components/schemas/Entry' + application/json: + schema: + $ref: '#/components/schemas/Entry' + text/json: + schema: + $ref: '#/components/schemas/Entry' + '400': + description: Bad Request + content: + text/plain: + schema: + $ref: '#/components/schemas/ProblemDetails' + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + text/plain: + schema: + $ref: '#/components/schemas/ProblemDetails' + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '500': + description: Internal Server Error + /api/moryx/notifications: + get: + tags: + - NotificationPublisher + operationId: GetAll + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/NotificationModel' + '/api/moryx/notifications/{guid}': + get: + tags: + - NotificationPublisher + operationId: Get + parameters: + - name: guid + in: path + required: true + schema: + type: string + format: uuid + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationModel' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/MoryxExceptionResponse' + /api/moryx/notifications/stream: + get: + tags: + - NotificationPublisher + operationId: NotificationStream + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/NotificationModel' + '/api/moryx/notifications/{guid}/acknowledge': + post: + tags: + - NotificationPublisher + operationId: Acknowledge + parameters: + - name: guid + in: path + required: true + schema: + type: string + format: uuid + responses: + '200': + description: OK + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/MoryxExceptionResponse' + /api/moryx/operators: + post: + tags: + - OperatorManagement + operationId: Add + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OperatorModel' + text/json: + schema: + $ref: '#/components/schemas/OperatorModel' + application/*+json: + schema: + $ref: '#/components/schemas/OperatorModel' + required: true + responses: + '201': + description: Created + content: + application/json: + schema: + type: string + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + delete: + tags: + - OperatorManagement + operationId: DeleteOperator + parameters: + - name: operatorIdentifier + in: query + schema: + type: string + responses: + '204': + description: No Content + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + get: + tags: + - OperatorManagement + operationId: GetAll + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/AssignableOperator' + '/api/moryx/operators/{identifier}': + put: + tags: + - OperatorManagement + operationId: Update + parameters: + - name: identifier + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OperatorModel' + text/json: + schema: + $ref: '#/components/schemas/OperatorModel' + application/*+json: + schema: + $ref: '#/components/schemas/OperatorModel' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + type: string + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + get: + tags: + - OperatorManagement + operationId: Get + parameters: + - name: identifier + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ExtendedOperatorModel' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '/api/moryx/operators/get-operators-by-resource/{resourceId}': + get: + tags: + - OperatorManagement + operationId: GetOperatorsByResource + parameters: + - name: resourceId + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ExtendedOperatorModel' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '/api/moryx/operators/resources/{operatorIdentifier}': + get: + tags: + - OperatorManagement + operationId: GetResources + parameters: + - name: operatorIdentifier + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/AttendableResourceModel' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /api/moryx/operators/resources: + get: + tags: + - OperatorManagement + operationId: GetResources + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/AttendableResourceModel' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /api/moryx/operators/default: + get: + tags: + - OperatorManagement + operationId: GetDefaultOperator + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ExtendedOperatorModel' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /api/moryx/operators/signin: + put: + tags: + - OperatorManagement + operationId: SignIn + parameters: + - name: operatorIdentifier + in: query + schema: + type: string + - name: resourceId + in: query + schema: + type: integer + format: int64 + responses: + '200': + description: OK + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /api/moryx/operators/signout: + put: + tags: + - OperatorManagement + operationId: SignOut + parameters: + - name: operatorIdentifier + in: query + schema: + type: string + - name: resourceId + in: query + schema: + type: integer + format: int64 + responses: + '200': + description: OK + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /api/moryx/operators/stream: + get: + tags: + - OperatorManagement + operationId: Stream + responses: + '200': + description: OK + /api/moryx/orders: + get: + tags: + - OrderManagement + summary: "Retrieve all current operations that match the given filter parameters.\r\nAlready completed or aborted Operations won't be included." + operationId: GetOperations + parameters: + - name: orderNumber + in: query + description: Optional. If specified only operations that belong to this order will be returned + schema: + type: string + - name: operationNumber + in: query + description: Optional. If specified only operations with this operation number will be returned + schema: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OperationModel' + post: + tags: + - OrderManagement + summary: Add an operation to the order stock + operationId: AddOperation + parameters: + - name: sourceId + in: query + description: Identifier of the application adding the operation + schema: + type: string + requestBody: + description: Description of the operation + content: + application/json: + schema: + $ref: '#/components/schemas/OperationCreationContextModel' + text/json: + schema: + $ref: '#/components/schemas/OperationCreationContextModel' + application/*+json: + schema: + $ref: '#/components/schemas/OperationCreationContextModel' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/OperationModel' + '400': + description: Bad Request + content: + application/json: + schema: + type: string + /api/moryx/orders/stream: + get: + tags: + - OrderManagement + summary: Stream that allow subscribing to operation changes. + operationId: OperationStream + responses: + '200': + description: OK + content: + text/event-stream: + schema: + oneOf: + - $ref: '#/components/schemas/SseItemOfOperationStartedModel' + - $ref: '#/components/schemas/SseItemOfOperationModel' + - $ref: '#/components/schemas/SseItemOfOperationReportedModel' + - $ref: '#/components/schemas/SseItemOfOperationReportedModel' + - $ref: '#/components/schemas/SseItemOfOperationReportedModel' + - $ref: '#/components/schemas/SseItemOfOperationAdvicedModel' + - $ref: '#/components/schemas/SseItemOfOperationModel' + discriminator: + propertyName: type + mapping: + Start: '#/components/schemas/SseItemOfOperationStartedModel' + Progress: '#/components/schemas/SseItemOfOperationModel' + Completed: '#/components/schemas/SseItemOfOperationReportedModel' + Interrupted: '#/components/schemas/SseItemOfOperationReportedModel' + Report: '#/components/schemas/SseItemOfOperationReportedModel' + Advice: '#/components/schemas/SseItemOfOperationAdvicedModel' + Update: '#/components/schemas/SseItemOfOperationModel' + '/api/moryx/orders/{guid}': + get: + tags: + - OrderManagement + summary: "Retrieves an operationmodel using the unique id of the operation\r\n(Can load completed operations from storage)" + operationId: GetOperation + parameters: + - name: guid + in: path + description: '' + required: true + schema: + type: string + format: uuid + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/OperationModel' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/MoryxExceptionResponse' + '/api/moryx/orders/{guid}/documents': + get: + tags: + - OrderManagement + summary: Retrieve the documents attached to operation with the given id + operationId: GetDocuments + parameters: + - name: guid + in: path + description: Id of the operation + required: true + schema: + type: string + format: uuid + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/DocumentModel' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/MoryxExceptionResponse' + '/api/moryx/orders/{guid}/document/{identifier}/stream': + get: + tags: + - OrderManagement + summary: Retrieves the content of the document specified using the operation id and the identifier of the document + operationId: GetDocumentStream + parameters: + - name: guid + in: path + description: Id of the operation + required: true + schema: + type: string + format: uuid + - name: identifier + in: path + description: Identifier of the document + required: true + schema: + type: string + responses: + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/MoryxExceptionResponse' + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/FileStreamResult' + '/api/moryx/orders/{guid}/productparts': + get: + tags: + - OrderManagement + summary: Retrieve a list of product parts attached to the given operation + operationId: GetProductParts + parameters: + - name: guid + in: path + description: If of the operation + required: true + schema: + type: string + format: uuid + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProductPartModel' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/MoryxExceptionResponse' + '/api/moryx/orders/{guid}/begin': + get: + tags: + - OrderManagement + summary: Retrieves the begin context for the given operation + operationId: GetBeginContext + parameters: + - name: guid + in: path + description: Id of the operation + required: true + schema: + type: string + format: uuid + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/BeginContext' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/MoryxExceptionResponse' + post: + tags: + - OrderManagement + summary: Begin producing the operation using the given parameters + operationId: BeginOperation + parameters: + - name: guid + in: path + description: Id of the operation + required: true + schema: + type: string + format: uuid + requestBody: + description: Begin parameters + content: + application/json: + schema: + $ref: '#/components/schemas/BeginModel' + text/json: + schema: + $ref: '#/components/schemas/BeginModel' + application/*+json: + schema: + $ref: '#/components/schemas/BeginModel' + required: true + responses: + '200': + description: OK + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/MoryxExceptionResponse' + '/api/moryx/orders/{guid}/report': + get: + tags: + - OrderManagement + summary: Retrieves a report context for the given operation + operationId: GetReportContext + parameters: + - name: guid + in: path + description: Id of the operation + required: true + schema: + type: string + format: uuid + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ReportContext' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/MoryxExceptionResponse' + post: + tags: + - OrderManagement + summary: Report produced amounts of a given operation + operationId: ReportOperation + parameters: + - name: guid + in: path + description: Id of the operation + required: true + schema: + type: string + format: uuid + requestBody: + description: Parameter object + content: + application/json: + schema: + $ref: '#/components/schemas/ReportModel' + text/json: + schema: + $ref: '#/components/schemas/ReportModel' + application/*+json: + schema: + $ref: '#/components/schemas/ReportModel' + required: true + responses: + '200': + description: OK + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/MoryxExceptionResponse' + '/api/moryx/orders/{guid}/interrupt': + get: + tags: + - OrderManagement + summary: Retrieves a interrupt context for the given operation + operationId: GetInterruptContext + parameters: + - name: guid + in: path + description: Id of the operation + required: true + schema: + type: string + format: uuid + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ReportContext' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/MoryxExceptionResponse' + post: + tags: + - OrderManagement + summary: Interrupt the given operation + operationId: InterruptOperation + parameters: + - name: guid + in: path + description: Id of the operation + required: true + schema: + type: string + format: uuid + - name: userIdentifier + in: query + description: Identifier of the user requesting the interrupt (Optional depending on configuration) + schema: + type: string + responses: + '200': + description: OK + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/MoryxExceptionResponse' + '/api/moryx/orders/{guid}/advice': + get: + tags: + - OrderManagement + summary: Retrieves a advice context for the given operation + operationId: GetAdviceContext + parameters: + - name: guid + in: path + description: Id of the operation + required: true + schema: + type: string + format: uuid + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/AdviceContext' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/MoryxExceptionResponse' + post: + tags: + - OrderManagement + summary: Advice operation + operationId: AdviceOperation + parameters: + - name: guid + in: path + description: Id of the operation + required: true + schema: + type: string + format: uuid + requestBody: + description: Parameter object + content: + application/json: + schema: + $ref: '#/components/schemas/AdviceModel' + text/json: + schema: + $ref: '#/components/schemas/AdviceModel' + application/*+json: + schema: + $ref: '#/components/schemas/AdviceModel' + required: true + responses: + '200': + description: OK + '400': + description: Bad Request + content: + application/json: + schema: + type: string + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/MoryxExceptionResponse' + '/api/moryx/orders/{guid}/logs': + get: + tags: + - OrderManagement + summary: Retrieves logs written during the creation of the operation + operationId: GetLogs + parameters: + - name: guid + in: path + description: Id of the operation + required: true + schema: + type: string + format: uuid + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OperationLogMessageModel' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/MoryxExceptionResponse' + /api/moryx/orders/recipes: + get: + tags: + - OrderManagement + summary: Get's the list of recipes available to produce the given product + operationId: GetAssignableRecipes + parameters: + - name: identifier + in: query + description: Product identifier + schema: + type: string + - name: revision + in: query + description: Product revision + schema: + type: integer + format: int16 + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OperationRecipeModel' + '/api/moryx/orders/{guid}/abort': + post: + tags: + - OrderManagement + summary: Abort the specified operation (Remove it before being started) + operationId: AbortOperation + parameters: + - name: guid + in: path + description: Id of the operation + required: true + schema: + type: string + format: uuid + responses: + '200': + description: OK + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/MoryxExceptionResponse' + '/api/moryx/orders/{guid}/update': + put: + tags: + - OrderManagement + summary: Update the operation + operationId: UpdateOperation + parameters: + - name: guid + in: path + description: Id of the operation + required: true + schema: + type: string + format: uuid + requestBody: + description: Paramter object + content: + application/json: + schema: + $ref: '#/components/schemas/OperationUpdateModel' + text/json: + schema: + $ref: '#/components/schemas/OperationUpdateModel' + application/*+json: + schema: + $ref: '#/components/schemas/OperationUpdateModel' + required: true + responses: + '200': + description: OK + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/MoryxExceptionResponse' + '/api/moryx/orders/{guid}/reload': + put: + tags: + - OrderManagement + summary: 'Reload the operation, rerunning the order assignment steps' + operationId: Reload + parameters: + - name: guid + in: path + description: Id of the operation + required: true + schema: + type: string + format: uuid + responses: + '200': + description: OK + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/MoryxExceptionResponse' + /api/moryx/processes/job: + get: + tags: + - ProcessEngine + operationId: GetRunningProcessesOfJob + parameters: + - name: jobId + in: query + schema: + type: integer + format: int64 + - name: allProcesses + in: query + schema: + type: boolean + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/JobProcessModel' + /api/moryx/processes/running: + get: + tags: + - ProcessEngine + operationId: GetRunningProcesses + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/JobProcessModel' + '/api/moryx/processes/instance/{productInstanceId}': + get: + tags: + - ProcessEngine + operationId: GetProcesses + parameters: + - name: productInstanceId + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/JobProcessModel' + '404': + description: Not Found + content: + application/json: + schema: + type: string + '/api/moryx/processes/running/{id}': + get: + tags: + - ProcessEngine + operationId: GetProcess + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/JobProcessModel' + '404': + description: Not Found + content: + application/json: + schema: + type: string + '/api/moryx/processes/running/{id}/activities': + get: + tags: + - ProcessEngine + operationId: GetActivities + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProcessActivityModel' + '404': + description: Not Found + content: + application/json: + schema: + type: string + '/api/moryx/processes/running/{id}/targets': + get: + tags: + - ProcessEngine + operationId: GetTargets + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ActivityResourceModel' + '404': + description: Not Found + content: + application/json: + schema: + type: string + '/api/moryx/processes/running/{id}/targets/{activityId}': + get: + tags: + - ProcessEngine + operationId: GetTargets + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: activityId + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ActivityResourceModel' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/MoryxExceptionResponse' + /api/moryx/processes/stream/processes: + get: + tags: + - ProcessEngine + operationId: ProcessUpdatesStream + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/JobProcessModel' + /api/moryx/processes/stream/activities: + get: + tags: + - ProcessEngine + operationId: ActivitiesUpdatesStream + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ProcessActivityModel' + /api/moryx/processes/holders/groups: + get: + tags: + - ProcessEngine + operationId: GetGroups + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponseOfProcessHolderGroupModel[]' + /api/moryx/processes/holders/stream: + get: + tags: + - ProcessEngine + operationId: GroupStream + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ProcessHolderGroupModel' + '/api/moryx/processes/holders/groups/{id}/reset': + post: + tags: + - ProcessEngine + operationId: ResetGroup + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int32 + responses: + '200': + description: OK + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '/api/moryx/processes/holders/positions/{id}/reset': + post: + tags: + - ProcessEngine + operationId: ResetPosition + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int32 + responses: + '200': + description: OK + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /api/moryx/products/configuration: + get: + tags: + - ProductManagement + summary: 'Loads dataset of existing products, recipes and importers for the UI' + operationId: GetProductCustomization + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ProductCustomization' + '/api/moryx/products/importers/{importerName}': + post: + tags: + - ProductManagement + summary: Run the product importer with the given parameters + operationId: Import + parameters: + - name: importerName + in: path + description: Name of the importer + required: true + schema: + type: string + requestBody: + description: Parameters for the importer + content: + application/json: + schema: + $ref: '#/components/schemas/Entry' + text/json: + schema: + $ref: '#/components/schemas/Entry' + application/*+json: + schema: + $ref: '#/components/schemas/Entry' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProductModel' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /api/moryx/products/types: + post: + tags: + - ProductManagement + summary: Store the product type in the database + operationId: SaveType + requestBody: + description: Model of the new product + content: + application/json: + schema: + $ref: '#/components/schemas/ProductModel' + text/json: + schema: + $ref: '#/components/schemas/ProductModel' + application/*+json: + schema: + $ref: '#/components/schemas/ProductModel' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + type: integer + format: int64 + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + get: + tags: + - ProductManagement + summary: 'Retrieves all product types, if no identity is specified. Otherwise the model identified by that id is returned' + operationId: GetTypeByIdentity + parameters: + - name: identity + in: query + description: Optional. The id to look for + schema: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProductModel' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /api/moryx/products/types/query: + post: + tags: + - ProductManagement + summary: Query the product type database + operationId: GetTypes + requestBody: + description: Query parameters + content: + application/json: + schema: + $ref: '#/components/schemas/ProductQuery' + text/json: + schema: + $ref: '#/components/schemas/ProductQuery' + application/*+json: + schema: + $ref: '#/components/schemas/ProductQuery' + required: true + responses: + '200': + description: The products models matching the query + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProductModel' + '/api/moryx/products/types/{id}': + get: + tags: + - ProductManagement + summary: Get's a product type using the database id + operationId: GetTypeById + parameters: + - name: id + in: path + description: Database id + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ProductModel' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + delete: + tags: + - ProductManagement + summary: Deletes the product type with the given id + operationId: DeleteType + parameters: + - name: id + in: path + description: '' + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: OK + content: + application/json: + schema: + type: boolean + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + put: + tags: + - ProductManagement + summary: Updates the existing product type + operationId: UpdateType + parameters: + - name: id + in: path + description: Database id of the product type + required: true + schema: + type: integer + format: int64 + requestBody: + description: New product model + content: + application/json: + schema: + $ref: '#/components/schemas/ProductModel' + text/json: + schema: + $ref: '#/components/schemas/ProductModel' + application/*+json: + schema: + $ref: '#/components/schemas/ProductModel' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + type: integer + format: int64 + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + post: + tags: + - ProductManagement + summary: Create a clone of the product type identified with the id with the new identitiy + operationId: Duplicate + parameters: + - name: id + in: path + description: Database id of the existing product type + required: true + schema: + type: integer + format: int64 + requestBody: + description: Product identifier of the new product + content: + application/json: + schema: + type: string + text/json: + schema: + type: string + application/*+json: + schema: + type: string + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ProductModel' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '409': + description: Conflict + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '/api/moryx/products/types/{id}/recipes/{classification}': + get: + tags: + - ProductManagement + summary: Loads the recipe attached to the product type with the id + operationId: GetRecipes + parameters: + - name: id + in: path + description: Database id + required: true + schema: + type: integer + format: int64 + - name: classification + in: path + description: Recipe classification RecipeClassification + required: true + schema: + type: integer + format: int32 + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/RecipeModel' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '/api/moryx/products/instances/{id}': + get: + tags: + - ProductManagement + summary: Get's the product instance with the given id + operationId: GetInstance + parameters: + - name: id + in: path + description: Database id of the product instance + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ProductInstanceModel' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /api/moryx/products/instances: + get: + tags: + - ProductManagement + summary: Loads multiple product instances at once + operationId: GetInstances + parameters: + - name: ids + in: query + description: A list of product instance ids + schema: + type: array + items: + type: integer + format: int64 + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProductInstanceModel' + post: + tags: + - ProductManagement + summary: Create a new product instace of the product type identified via the identifier and revision + operationId: CreateInstance + parameters: + - name: identifier + in: query + description: Product identifier + schema: + type: string + - name: revision + in: query + description: Revision of the product + schema: + type: integer + format: int16 + - name: save + in: query + description: 'If save is false, the new instance won''t be stored in the db' + schema: + type: boolean + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ProductInstanceModel' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + put: + tags: + - ProductManagement + summary: Save the instance in the product db + operationId: SaveInstance + requestBody: + description: Model of the product instance + content: + application/json: + schema: + $ref: '#/components/schemas/ProductInstanceModel' + text/json: + schema: + $ref: '#/components/schemas/ProductInstanceModel' + application/*+json: + schema: + $ref: '#/components/schemas/ProductInstanceModel' + required: true + responses: + '200': + description: OK + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '/api/moryx/products/recipes/{id}': + get: + tags: + - ProductManagement + summary: Get's a recipe by it's db id + operationId: GetRecipe + parameters: + - name: id + in: path + description: Database id of the recipe + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeModel' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + put: + tags: + - ProductManagement + summary: Updates the existing recipes + operationId: UpdateRecipe + parameters: + - name: id + in: path + description: Database id of the recipe + required: true + schema: + type: integer + format: int64 + requestBody: + description: Updated recipe model + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeModel' + text/json: + schema: + $ref: '#/components/schemas/RecipeModel' + application/*+json: + schema: + $ref: '#/components/schemas/RecipeModel' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + type: integer + format: int64 + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /api/moryx/products/recipes: + post: + tags: + - ProductManagement + summary: Saves a new recipe in the database + operationId: SaveRecipe + requestBody: + description: Model of the recipe + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeModel' + text/json: + schema: + $ref: '#/components/schemas/RecipeModel' + application/*+json: + schema: + $ref: '#/components/schemas/RecipeModel' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + type: integer + format: int64 + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '/api/moryx/products/recipe/construct/{recipeType}': + get: + tags: + - ProductManagement + operationId: CreateRecipe + parameters: + - name: recipeType + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeModel' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /api/moryx/resources/types: + get: + tags: + - ResourceModification + operationId: GetTypeTree + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceTypeModel' + '417': + description: Expectation Failed + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /api/moryx/resources: + get: + tags: + - ResourceModification + operationId: GetDetailsBatch + parameters: + - name: ids + in: query + schema: + type: array + items: + type: integer + format: int64 + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ResourceModel' + '417': + description: Expectation Failed + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + post: + tags: + - ResourceModification + operationId: Save + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceModel' + text/json: + schema: + $ref: '#/components/schemas/ResourceModel' + application/*+json: + schema: + $ref: '#/components/schemas/ResourceModel' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceModel' + '409': + description: Conflict + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '500': + description: Internal Server Error + /api/moryx/resources/query: + post: + tags: + - ResourceModification + operationId: GetResources + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceQuery' + text/json: + schema: + $ref: '#/components/schemas/ResourceQuery' + application/*+json: + schema: + $ref: '#/components/schemas/ResourceQuery' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ResourceModel' + '417': + description: Expectation Failed + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '/api/moryx/resources/{id}': + get: + tags: + - ResourceModification + operationId: GetDetails + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceModel' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '417': + description: Expectation Failed + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + put: + tags: + - ResourceModification + operationId: Update + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceModel' + text/json: + schema: + $ref: '#/components/schemas/ResourceModel' + application/*+json: + schema: + $ref: '#/components/schemas/ResourceModel' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceModel' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '500': + description: Internal Server Error + delete: + tags: + - ResourceModification + operationId: Remove + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: OK + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '417': + description: Expectation Failed + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '/api/moryx/resources/{id}/invoke/{method}': + post: + tags: + - ResourceModification + operationId: InvokeMethod + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: method + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Entry' + text/json: + schema: + $ref: '#/components/schemas/Entry' + application/*+json: + schema: + $ref: '#/components/schemas/Entry' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Entry' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '417': + description: Expectation Failed + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '/api/moryx/resources/types/{type}': + post: + tags: + - ResourceModification + operationId: ConstructWithParameters + parameters: + - name: type + in: path + required: true + schema: + type: string + - name: method + in: query + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Entry' + text/json: + schema: + $ref: '#/components/schemas/Entry' + application/*+json: + schema: + $ref: '#/components/schemas/Entry' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceModel' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '417': + description: Expectation Failed + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /api/moryx/shifts: + get: + tags: + - ShiftManagement + operationId: GetShifts + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ShiftModel' + post: + tags: + - ShiftManagement + operationId: CreateShift + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ShiftCreationContextModel' + text/json: + schema: + $ref: '#/components/schemas/ShiftCreationContextModel' + application/*+json: + schema: + $ref: '#/components/schemas/ShiftCreationContextModel' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ShiftModel' + put: + tags: + - ShiftManagement + operationId: UpdateShift + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ShiftModel' + text/json: + schema: + $ref: '#/components/schemas/ShiftModel' + application/*+json: + schema: + $ref: '#/components/schemas/ShiftModel' + required: true + responses: + '200': + description: OK + /api/moryx/shifts/filter: + get: + tags: + - ShiftManagement + operationId: GetShifts + parameters: + - name: earliestDate + in: query + schema: + type: string + format: date + - name: latestDate + in: query + schema: + type: string + format: date + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ShiftModel' + '/api/moryx/shifts/{id}': + delete: + tags: + - ShiftManagement + operationId: DeleteShift + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: OK + /api/moryx/shifts/types: + get: + tags: + - ShiftManagement + operationId: GetShiftTypes + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ShiftTypeModel' + post: + tags: + - ShiftManagement + operationId: CreateShiftType + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ShiftTypeCreationContextModel' + text/json: + schema: + $ref: '#/components/schemas/ShiftTypeCreationContextModel' + application/*+json: + schema: + $ref: '#/components/schemas/ShiftTypeCreationContextModel' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ShiftTypeModel' + put: + tags: + - ShiftManagement + operationId: UpdateShiftType + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ShiftTypeModel' + text/json: + schema: + $ref: '#/components/schemas/ShiftTypeModel' + application/*+json: + schema: + $ref: '#/components/schemas/ShiftTypeModel' + required: true + responses: + '200': + description: OK + '/api/moryx/shifts/types/{id}': + delete: + tags: + - ShiftManagement + operationId: DeleteShiftType + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: OK + /api/moryx/shifts/assignements: + get: + tags: + - ShiftManagement + operationId: GetShiftAssignements + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ShiftAssignementModel' + post: + tags: + - ShiftManagement + operationId: CreateShiftAssignement + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ShiftAssignementCreationContextModel' + text/json: + schema: + $ref: '#/components/schemas/ShiftAssignementCreationContextModel' + application/*+json: + schema: + $ref: '#/components/schemas/ShiftAssignementCreationContextModel' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ShiftAssignementModel' + put: + tags: + - ShiftManagement + operationId: UpdateShiftAssignement + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ShiftAssignementModel' + text/json: + schema: + $ref: '#/components/schemas/ShiftAssignementModel' + application/*+json: + schema: + $ref: '#/components/schemas/ShiftAssignementModel' + required: true + responses: + '200': + description: OK + /api/moryx/shifts/assignements/filter: + get: + tags: + - ShiftManagement + operationId: GetShiftAssignements + parameters: + - name: earliestDate + in: query + schema: + type: string + format: date + - name: latestDate + in: query + schema: + type: string + format: date + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ShiftAssignementModel' + '/api/moryx/shifts/assignements/{id}': + delete: + tags: + - ShiftManagement + operationId: DeleteShiftAssignement + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: OK + /api/moryx/skills/types: + get: + tags: + - SkillManagement + operationId: GetTypes + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SkillTypeModel' + '400': + description: Bad Request + content: + application/json: + schema: + type: string + post: + tags: + - SkillManagement + operationId: Create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SkillTypeCreationContextModel' + text/json: + schema: + $ref: '#/components/schemas/SkillTypeCreationContextModel' + application/*+json: + schema: + $ref: '#/components/schemas/SkillTypeCreationContextModel' + required: true + responses: + '201': + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/SkillTypeModel' + '400': + description: Bad Request + content: + application/json: + schema: + type: string + put: + tags: + - SkillManagement + operationId: Update + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SkillTypeModel' + text/json: + schema: + $ref: '#/components/schemas/SkillTypeModel' + application/*+json: + schema: + $ref: '#/components/schemas/SkillTypeModel' + required: true + responses: + '204': + description: No Content + '400': + description: Bad Request + content: + application/json: + schema: + type: string + '404': + description: Not Found + content: + application/json: + schema: + type: string + '/api/moryx/skills/types/{id}': + get: + tags: + - SkillManagement + operationId: GetType + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/SkillTypeModel' + '400': + description: Bad Request + content: + application/json: + schema: + type: string + '404': + description: Not Found + content: + application/json: + schema: + type: string + delete: + tags: + - SkillManagement + operationId: DeleteType + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: No Content + '400': + description: Bad Request + content: + application/json: + schema: + type: string + '404': + description: Not Found + content: + application/json: + schema: + type: string + /api/moryx/skills/types/prototype: + get: + tags: + - SkillManagement + operationId: GetTypePrototype + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/SkillTypeModel' + '400': + description: Bad Request + content: + application/json: + schema: + type: string + /api/moryx/skills: + get: + tags: + - SkillManagement + operationId: GetSkills + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SkillModel' + '400': + description: Bad Request + content: + application/json: + schema: + type: string + post: + tags: + - SkillManagement + operationId: Create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SkillCreationContextModel' + text/json: + schema: + $ref: '#/components/schemas/SkillCreationContextModel' + application/*+json: + schema: + $ref: '#/components/schemas/SkillCreationContextModel' + required: true + responses: + '201': + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/SkillModel' + '400': + description: Bad Request + content: + application/json: + schema: + type: string + '404': + description: Not Found + content: + application/json: + schema: + type: string + '/api/moryx/skills/{id}': + get: + tags: + - SkillManagement + operationId: GetSkill + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/SkillModel' + '400': + description: Bad Request + content: + application/json: + schema: + type: string + '404': + description: Not Found + content: + application/json: + schema: + type: string + delete: + tags: + - SkillManagement + operationId: DeleteSkill + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: No Content + '400': + description: Bad Request + content: + application/json: + schema: + type: string + '404': + description: Not Found + content: + application/json: + schema: + type: string + '/foo/{value}': + get: + tags: + - Test + operationId: GetFoo + parameters: + - name: value + in: path + required: true + schema: + type: integer + format: int32 + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Foo' + /api/moryx/instructions/stream: + get: + tags: + - VisualInstructions + operationId: InstructionStream + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/InstructionModel' + '400': + description: Bad Request + content: + application/json: + schema: + type: string + '/api/moryx/instructions/{identifier}': + get: + tags: + - VisualInstructions + operationId: GetAll + parameters: + - name: identifier + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/InstructionModel' + '400': + description: Bad Request + content: + application/json: + schema: + type: string + post: + tags: + - VisualInstructions + operationId: AddInstruction + parameters: + - name: identifier + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/InstructionModel' + text/json: + schema: + $ref: '#/components/schemas/InstructionModel' + application/*+json: + schema: + $ref: '#/components/schemas/InstructionModel' + required: true + responses: + '200': + description: OK + delete: + tags: + - VisualInstructions + operationId: ClearInstruction + parameters: + - name: identifier + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/InstructionModel' + text/json: + schema: + $ref: '#/components/schemas/InstructionModel' + application/*+json: + schema: + $ref: '#/components/schemas/InstructionModel' + required: true + responses: + '200': + description: OK + '/api/moryx/instructions/{identifier}/response': + put: + tags: + - VisualInstructions + operationId: CompleteInstruction + parameters: + - name: identifier + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/InstructionResponseModel' + text/json: + schema: + $ref: '#/components/schemas/InstructionResponseModel' + application/*+json: + schema: + $ref: '#/components/schemas/InstructionResponseModel' + required: true + responses: + '200': + description: OK + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /api/moryx/instructions/instructors: + get: + tags: + - VisualInstructions + operationId: GetInstructors + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + type: string + /api/moryx/workplans: + get: + tags: + - Workplan + operationId: GetAllWorkplans + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/WorkplanModel' + post: + tags: + - Workplan + operationId: SaveWorkplan + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WorkplanModel' + text/json: + schema: + $ref: '#/components/schemas/WorkplanModel' + application/*+json: + schema: + $ref: '#/components/schemas/WorkplanModel' + required: true + responses: + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '/api/moryx/workplans/{id}/versions': + get: + tags: + - Workplan + operationId: GetVersions + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/WorkplanModel' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '/api/moryx/workplans/{id}': + get: + tags: + - Workplan + operationId: GetWorkplan + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/WorkplanModel' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + delete: + tags: + - Workplan + operationId: DeleteWorkplan + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: OK + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + put: + tags: + - Workplan + operationId: UpdateWorkplan + parameters: + - name: id + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WorkplanModel' + text/json: + schema: + $ref: '#/components/schemas/WorkplanModel' + application/*+json: + schema: + $ref: '#/components/schemas/WorkplanModel' + required: true + responses: + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /api/moryx/workplans/steps: + get: + tags: + - WorkplanEditing + operationId: AvailableSteps + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/WorkplanStepRecipe' + /api/moryx/workplans/sessions: + post: + tags: + - WorkplanEditing + operationId: EditWorkplan + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenSessionRequest' + text/json: + schema: + $ref: '#/components/schemas/OpenSessionRequest' + application/*+json: + schema: + $ref: '#/components/schemas/OpenSessionRequest' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/WorkplanSessionModel' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/MoryxExceptionResponse' + '/api/moryx/workplans/sessions/{sessionId}': + get: + tags: + - WorkplanEditing + operationId: OpenSession + parameters: + - name: sessionId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/WorkplanSessionModel' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/MoryxExceptionResponse' + put: + tags: + - WorkplanEditing + operationId: UpdateSession + parameters: + - name: sessionId + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WorkplanSessionModel' + text/json: + schema: + $ref: '#/components/schemas/WorkplanSessionModel' + application/*+json: + schema: + $ref: '#/components/schemas/WorkplanSessionModel' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/WorkplanSessionModel' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/MoryxExceptionResponse' + delete: + tags: + - WorkplanEditing + operationId: CloseSession + parameters: + - name: sessionId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + '/api/moryx/workplans/sessions/{sessionId}/autolayout': + get: + tags: + - WorkplanEditing + operationId: AutoLayout + parameters: + - name: sessionId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/WorkplanSessionModel' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/MoryxExceptionResponse' + '/api/moryx/workplans/sessions/{sessionId}/save': + post: + tags: + - WorkplanEditing + operationId: SaveSession + parameters: + - name: sessionId + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WorkplanSessionModel' + text/json: + schema: + $ref: '#/components/schemas/WorkplanSessionModel' + application/*+json: + schema: + $ref: '#/components/schemas/WorkplanSessionModel' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/WorkplanSessionModel' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/MoryxExceptionResponse' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/MoryxExceptionResponse' + '/api/moryx/workplans/sessions/{sessionId}/validate': + get: + tags: + - WorkplanEditing + operationId: ValidateSession + parameters: + - name: sessionId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationResultModel' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/MoryxExceptionResponse' + '/api/moryx/workplans/sessions/{sessionId}/nodes': + post: + tags: + - WorkplanEditing + operationId: AddStep + parameters: + - name: sessionId + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WorkplanStepRecipe' + text/json: + schema: + $ref: '#/components/schemas/WorkplanStepRecipe' + application/*+json: + schema: + $ref: '#/components/schemas/WorkplanStepRecipe' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/WorkplanNodeModel' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/MoryxExceptionResponse' + '/api/moryx/workplans/sessions/{sessionId}/nodes/{nodeId}': + put: + tags: + - WorkplanEditing + operationId: UpdateStep + parameters: + - name: sessionId + in: path + required: true + schema: + type: string + - name: nodeId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WorkplanNodeModel' + text/json: + schema: + $ref: '#/components/schemas/WorkplanNodeModel' + application/*+json: + schema: + $ref: '#/components/schemas/WorkplanNodeModel' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/WorkplanNodeModel' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/MoryxExceptionResponse' + delete: + tags: + - WorkplanEditing + operationId: RemoveNode + parameters: + - name: sessionId + in: path + required: true + schema: + type: string + - name: nodeId + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/WorkplanSessionModel' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/MoryxExceptionResponse' + '/api/moryx/workplans/sessions/{sessionId}/nodes/{targetNodeId}/{targetIndex}': + post: + tags: + - WorkplanEditing + operationId: ConnectStep + parameters: + - name: sessionId + in: path + required: true + schema: + type: string + - name: targetNodeId + in: path + required: true + schema: + type: integer + format: int64 + - name: targetIndex + in: path + required: true + schema: + type: integer + format: int32 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NodeConnector' + text/json: + schema: + $ref: '#/components/schemas/NodeConnector' + application/*+json: + schema: + $ref: '#/components/schemas/NodeConnector' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/WorkplanSessionModel' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/MoryxExceptionResponse' + delete: + tags: + - WorkplanEditing + operationId: DisconnectStep + parameters: + - name: sessionId + in: path + required: true + schema: + type: string + - name: targetNodeId + in: path + required: true + schema: + type: integer + format: int64 + - name: targetIndex + in: path + required: true + schema: + type: integer + format: int32 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NodeConnector' + text/json: + schema: + $ref: '#/components/schemas/NodeConnector' + application/*+json: + schema: + $ref: '#/components/schemas/NodeConnector' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/WorkplanSessionModel' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/MoryxExceptionResponse' +components: + schemas: + ActivityChangedModel: + type: object + properties: + id: + type: integer + format: int64 + resourceId: + type: integer + format: int64 + classification: + $ref: '#/components/schemas/ActivityClassification' + orderReferenceModel: + $ref: '#/components/schemas/OrderReferenceModel' + ActivityClassification: + enum: + - Unknown + - Production + - Setup + - Maintenance + - Preparation + type: string + description: "Defines different classifications of activities. A resource will define accepted classifications\r\nin the published ReadyToWork. An activity declares its classification which is compared\r\nto the accepted classification within the kernel. While a ReadyToWork can accept multiple\r\nclassifications (by combining flags), an activity has only one classification." + ActivityResourceModel: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + nullable: true + AdviceContext: + type: object + properties: + advicedAmount: + type: integer + description: Amount which are already adviced + format: int32 + description: Context for a new advice with all necessary information + AdviceModel: + type: object + properties: + toteBoxNumber: + type: string + nullable: true + amount: + type: integer + format: int32 + partId: + type: integer + format: int64 + nullable: true + ApiError: + required: + - errorCode + - message + type: object + properties: + errorCode: + type: string + nullable: true + message: + type: string + nullable: true + exception: + $ref: '#/components/schemas/Exception' + 'ApiResponseOfProcessHolderGroupModel[]': + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/ProcessHolderGroupModel' + nullable: true + errors: + type: array + items: + $ref: '#/components/schemas/ApiError' + nullable: true + succeeded: + type: boolean + timestamp: + type: string + format: date-time + ApplicationInformationResponse: + type: object + properties: + assemblyProduct: + type: string + nullable: true + assemblyVersion: + type: string + nullable: true + assemblyInformationalVersion: + type: string + nullable: true + assemblyDescription: + type: string + nullable: true + assemblyCompanyName: + type: string + nullable: true + assemblyTitle: + type: string + nullable: true + assemblyConfiguration: + type: string + nullable: true + targetFramework: + type: string + nullable: true + assemblyCopyright: + type: string + nullable: true + assemblyTrademark: + type: string + nullable: true + AssemblyModel: + type: object + properties: + name: + type: string + nullable: true + version: + type: string + nullable: true + fileVersion: + type: string + nullable: true + informationalVersion: + type: string + nullable: true + AssignableOperator: + required: + - identifier + type: object + properties: + signedIn: + type: boolean + assignedResources: + type: array + items: + $ref: '#/components/schemas/IOperatorAssignable' + identifier: + type: string + firstName: + type: string + nullable: true + lastName: + type: string + nullable: true + pseudonym: + type: string + nullable: true + AssignedDays: + enum: + - All + - First + - Second + - Third + - Fourth + - Fifth + - Sixth + - Seventh + - Eighth + - Ninth + - Tenth + - Eleventh + - Twelfth + - Thirteenth + - Fourteenth + - Fifteenth + - Sixteenth + - Seventeenth + - Eighteenth + - Nineteenth + - Twentieth + - TwentyFirst + - TwentySecond + - TwentyThird + - TwentyFourth + - TwentyFifth + - TwentySixth + - TwentySeventh + - TwentyEighth + - TwentyNinth + - Thirtieth + - ThirtyFirst + type: string + AttendableResourceModel: + type: object + properties: + id: + type: integer + format: int64 + nullable: true + name: + type: string + nullable: true + requiredSkills: + type: array + items: + type: string + nullable: true + BeginContext: + type: object + properties: + residualAmount: + type: integer + description: Residual amount of the operation + format: int32 + partialAmount: + type: integer + description: Current target amount of the operation + format: int32 + minimalTargetAmount: + type: integer + description: Provides the minimum value that can be set for the target amount when adjusting the operation. + format: int32 + canBegin: + type: boolean + description: Indicator if a begin is possible + canReduce: + type: boolean + description: Indicator if an adjustment of the operation is possible + restrictions: + type: array + items: + $ref: '#/components/schemas/RestrictionDescription' + description: Reasons why a begin is not possible + nullable: true + successCount: + type: integer + description: Current success count of the operation + format: int32 + scrapCount: + type: integer + description: Current failure count of the operation + format: int32 + description: Context information to begin an operation production + BeginModel: + type: object + properties: + amount: + type: integer + format: int32 + userId: + type: string + nullable: true + Category: + enum: + - ProcessHolderGroup + - ParentResource + type: string + CellLocationModel: + type: object + properties: + id: + type: integer + format: int64 + positionX: + type: number + format: double + positionY: + type: number + format: double + CellPropertySettings: + type: object + properties: + valueUnit: + type: string + nullable: true + iconName: + type: string + nullable: true + isDisplayed: + type: boolean + currentValue: { } + displayName: + type: string + nullable: true + CellSettingsModel: + type: object + properties: + image: + type: string + nullable: true + icon: + type: string + nullable: true + CellState: + enum: + - Idle + - Requested + - Running + - NotReadyToWork + type: string + CellStateChangedModel: + type: object + properties: + id: + type: integer + format: int64 + state: + $ref: '#/components/schemas/CellState' + Config: + type: object + properties: + root: + $ref: '#/components/schemas/Entry' + ConfigUpdateMode: + enum: + - OnlySave + - SaveAndReincarnate + - UpdateLiveAndSave + type: string + ConfirmationType: + enum: + - Partial + - Final + type: string + description: Confirmation type while reporting amounts of an operation + ContentDescriptorModel: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + nullable: true + variants: + type: array + items: + $ref: '#/components/schemas/VariantDescriptor' + nullable: true + master: + $ref: '#/components/schemas/VariantDescriptor' + DatabaseConfigModel: + type: object + properties: + configuratorType: + type: string + nullable: true + connectionString: + type: string + nullable: true + properties: + $ref: '#/components/schemas/Entry' + DatabaseMigrationSummary: + type: object + properties: + result: + $ref: '#/components/schemas/MigrationResult' + errors: + type: array + items: + type: string + description: 'Reason, in case an error occured during migration' + nullable: true + executedMigrations: + type: array + items: + type: string + description: All updates that were executed + nullable: true + description: Result object created from running a database update + DatabasesResponse: + type: object + properties: + databases: + type: array + items: + $ref: '#/components/schemas/DataModel' + nullable: true + configurators: + type: array + items: + $ref: '#/components/schemas/ModelConfiguratorModel' + nullable: true + DataModel: + type: object + properties: + targetModel: + type: string + nullable: true + config: + $ref: '#/components/schemas/DatabaseConfigModel' + possibleConfigurators: + type: array + items: + type: string + nullable: true + setups: + type: array + items: + $ref: '#/components/schemas/SetupModel' + nullable: true + availableMigrations: + type: array + items: + $ref: '#/components/schemas/DbMigrationsModel' + nullable: true + appliedMigrations: + type: array + items: + $ref: '#/components/schemas/DbMigrationsModel' + nullable: true + DataType: + enum: + - Custom + - DateTime + - Date + - Time + - Duration + - PhoneNumber + - Currency + - Text + - Html + - MultilineText + - EmailAddress + - Password + - Url + - ImageUrl + - CreditCard + - PostalCode + - Upload + type: string + DbMigrationsModel: + type: object + properties: + name: + type: string + nullable: true + DependencyEvaluation: + type: object + properties: + rootModules: + type: integer + format: int32 + maxDepth: + type: integer + format: int32 + maxDependencies: + type: integer + format: int32 + maxDependends: + type: integer + format: int32 + DocumentModel: + type: object + properties: + identifier: + type: string + nullable: true + number: + type: string + nullable: true + revision: + type: integer + format: int16 + type: + type: string + nullable: true + description: + type: string + nullable: true + contentType: + type: string + nullable: true + source: + type: string + nullable: true + Entry: + type: object + properties: + displayName: + type: string + description: Name of the item - property name or list item name + nullable: true + identifier: + type: string + description: Unique identifier - property name or item index + nullable: true + description: + type: string + description: Description of the entry + nullable: true + value: + $ref: '#/components/schemas/EntryValue' + validation: + $ref: '#/components/schemas/EntryValidation' + subEntries: + type: array + items: + $ref: '#/components/schemas/Entry' + description: Subentries of this entry - properties or list items + nullable: true + prototypes: + type: array + items: + $ref: '#/components/schemas/Entry' + description: Prototypes that can be used to create subentries + nullable: true + description: Model class representing a single property of a config class + EntryPossible: + type: object + properties: + key: + type: string + description: Invariant key of the possible value. + nullable: true + displayName: + type: string + description: Display name of the possible value. + nullable: true + description: + type: string + description: Description of the possible value. + nullable: true + description: Possible value for an entry. + EntryUnitType: + enum: + - None + - Password + - FilePath + - DirectoryPath + - Flags + - Base64 + type: string + description: Enum describes the unit type of a entry + EntryValidation: + type: object + properties: + dataType: + $ref: '#/components/schemas/DataType' + minimum: + type: number + description: Minimum value or minimal length of strings + format: double + maximum: + type: number + description: Maximum value or maximal length of strings + format: double + regex: + type: string + description: Regex pattern for this entry + nullable: true + isRequired: + type: boolean + description: Indicated if the field is required and should not be empty + description: All validation rules of an entry + EntryValue: + type: object + properties: + type: + $ref: '#/components/schemas/EntryValueType' + unitType: + $ref: '#/components/schemas/EntryUnitType' + current: + type: string + description: Current value of this entry + nullable: true + default: + type: string + description: Default value of this entry + nullable: true + possible: + type: array + items: + $ref: '#/components/schemas/EntryPossible' + description: Possible values for this entry + nullable: true + isReadOnly: + type: boolean + description: Indicates wether the field is read only + description: Value of an config entry + EntryValueType: + enum: + - Byte + - Boolean + - Int16 + - UInt16 + - Int32 + - UInt32 + - Int64 + - UInt64 + - Single + - Double + - String + - Enum + - Class + - Collection + - Exception + - Stream + - Struct + - DateTime + - Date + - Time + - TimeSpan + type: string + description: Possible value types + Exception: + type: object + properties: + targetSite: + $ref: '#/components/schemas/MethodBase' + message: + type: string + nullable: true + data: + type: object + nullable: true + innerException: + $ref: '#/components/schemas/Exception' + helpLink: + type: string + nullable: true + source: + type: string + nullable: true + hResult: + type: integer + format: int32 + stackTrace: + type: string + nullable: true + ExecuteSetupRequest: + type: object + properties: + config: + $ref: '#/components/schemas/DatabaseConfigModel' + setup: + $ref: '#/components/schemas/SetupModel' + ExtendedOperatorModel: + type: object + properties: + assignedResources: + type: array + items: + $ref: '#/components/schemas/AttendableResourceModel' + nullable: true + identifier: + type: string + nullable: true + firstName: + type: string + nullable: true + lastName: + type: string + nullable: true + pseudonym: + type: string + nullable: true + FactoryModel: + type: object + properties: + parentId: + type: integer + format: int64 + id: + type: integer + format: int64 + backgroundURL: + type: string + nullable: true + title: + type: string + nullable: true + FactoryStateModel: + type: object + properties: + backgroundURL: + type: string + nullable: true + hasManufacturingFactory: + type: boolean + orderModels: + type: array + items: + $ref: '#/components/schemas/OrderModel' + nullable: true + activityChangedModels: + type: array + items: + $ref: '#/components/schemas/ActivityChangedModel' + nullable: true + cellStateChangedModels: + type: array + items: + $ref: '#/components/schemas/CellStateChangedModel' + nullable: true + resourceChangedModels: + type: array + items: + $ref: '#/components/schemas/ResourceChangedModel' + nullable: true + id: + type: integer + format: int64 + location: + $ref: '#/components/schemas/CellLocationModel' + iconName: + type: string + nullable: true + isACell: + type: boolean + FailureBehaviour: + enum: + - Stop + - StopAndNotify + type: string + description: 'Enum flags: Notify - Reincarnate' + FileStreamResult: + type: string + format: binary + Foo: + type: object + properties: + value: + type: integer + format: int32 + HostInformationResponse: + type: object + properties: + machineName: + type: string + nullable: true + osInformation: + type: string + nullable: true + upTime: + type: integer + format: int64 + ICapabilities: + type: object + properties: + isCombined: + type: boolean + description: Flag if the capabilities of this instance are implemented by sub instances + description: Common capabilities interface + IFormFile: + type: string + format: binary + InstructionContentType: + enum: + - Unknown + - Text + - Media + type: string + InstructionItemModel: + type: object + properties: + contentType: + $ref: '#/components/schemas/InstructionContentType' + content: + type: string + nullable: true + preview: + type: string + nullable: true + InstructionModel: + type: object + properties: + id: + type: integer + format: int64 + sender: + type: string + nullable: true + type: + $ref: '#/components/schemas/InstructionType' + items: + type: array + items: + $ref: '#/components/schemas/InstructionItemModel' + nullable: true + inputs: + $ref: '#/components/schemas/Entry' + results: + type: array + items: + $ref: '#/components/schemas/InstructionResultModel' + nullable: true + InstructionResponseModel: + type: object + properties: + id: + type: integer + format: int64 + inputs: + $ref: '#/components/schemas/Entry' + result: + type: string + nullable: true + selectedResult: + $ref: '#/components/schemas/InstructionResultModel' + InstructionResultModel: + type: object + properties: + key: + type: string + nullable: true + displayValue: + type: string + nullable: true + InstructionType: + enum: + - Display + - Execute + type: string + InternalOperationClassification: + enum: + - Initial + - Assigning + - Failed + - Aborted + - Ready + - Running + - Interrupting + - Interrupted + - Completed + - AmountReached + type: string + InvocationResponse: + type: object + properties: + success: + type: boolean + exceptionType: + type: string + nullable: true + errorMessage: + type: string + nullable: true + IOperatorAssignable: + type: object + properties: + requiredSkills: + $ref: '#/components/schemas/ICapabilities' + id: + type: integer + description: Id of the resource + format: int64 + name: + type: string + description: Name of this resource instance + nullable: true + capabilities: + $ref: '#/components/schemas/ICapabilities' + JobModel: + type: object + properties: + id: + type: integer + format: int64 + recipeId: + type: integer + format: int64 + state: + type: string + nullable: true + displayState: + type: string + nullable: true + workplan: + type: string + nullable: true + canComplete: + type: boolean + canAbort: + type: boolean + isWaiting: + type: boolean + isRunning: + type: boolean + productionJob: + $ref: '#/components/schemas/ProductionJobModel' + setupJob: + $ref: '#/components/schemas/SetupJobModel' + JobProcessModel: + type: object + properties: + id: + type: integer + format: int64 + recipeId: + type: integer + format: int64 + state: + $ref: '#/components/schemas/ProcessProgress' + rework: + type: boolean + started: + type: string + format: date-time + completed: + type: string + format: date-time + activities: + type: array + items: + $ref: '#/components/schemas/ProcessActivityModel' + nullable: true + isRunning: + type: boolean + LogLevel: + enum: + - Trace + - Debug + - Information + - Warning + - Error + - Critical + - None + type: string + MethodBase: { } + MethodEntry: + type: object + properties: + name: + type: string + description: Name of the method + nullable: true + isConstructor: + type: boolean + description: Flag if this structure represents a server side constructor + displayName: + type: string + description: Display name for the button + nullable: true + description: + type: string + description: Description of the method + nullable: true + parameters: + $ref: '#/components/schemas/Entry' + isAsync: + type: boolean + description: True if the method is awaitable by Task + description: Model that represents a public method on an object callable from the UI + MigrationResult: + enum: + - Migrated + - NoMigrationsAvailable + - Error + type: string + description: Result enum for executing database migrations + ModelConfiguratorModel: + type: object + properties: + name: + type: string + nullable: true + configuratorType: + type: string + nullable: true + connectionStringKeys: + type: object + additionalProperties: + type: string + nullable: true + connectionStringPrototype: + type: string + nullable: true + configPrototype: + $ref: '#/components/schemas/Entry' + ModuleNotificationModel: + type: object + properties: + timestamp: + type: string + format: date-time + exception: + $ref: '#/components/schemas/SerializableException' + message: + type: string + nullable: true + severity: + $ref: '#/components/schemas/Severity' + ModuleStartBehaviour: + enum: + - Auto + - Manual + - OnDependency + type: string + description: Start behaviour + MoryxExceptionResponse: + type: object + properties: + title: + type: string + nullable: true + exception: + type: string + nullable: true + NodeConnectionPoint: + type: object + properties: + index: + type: integer + format: int32 + name: + type: string + nullable: true + connections: + type: array + items: + $ref: '#/components/schemas/NodeConnector' + nullable: true + NodeConnector: + type: object + properties: + nodeId: + type: integer + format: int64 + index: + type: integer + format: int32 + NotificationModel: + type: object + properties: + identifier: + type: string + format: uuid + type: + type: string + nullable: true + title: + type: string + nullable: true + message: + type: string + nullable: true + severity: + $ref: '#/components/schemas/Severity' + created: + type: string + format: date-time + acknowledged: + type: string + format: date-time + nullable: true + isAcknowledgable: + type: boolean + properties: + $ref: '#/components/schemas/Entry' + sender: + type: string + nullable: true + source: + type: string + nullable: true + OpenSessionRequest: + type: object + properties: + workplanId: + type: integer + format: int64 + duplicate: + type: boolean + OperationAdvicedModel: + type: object + properties: + advice: + $ref: '#/components/schemas/AdviceModel' + operationModel: + $ref: '#/components/schemas/OperationModel' + OperationCreationContextModel: + type: object + properties: + totalAmount: + type: integer + description: The amount to produce + format: int32 + name: + type: string + description: Operation name + nullable: true + orderNumber: + type: string + description: The number of the order this operation belongs to + nullable: true + operationNumber: + type: string + description: The number of this operation + nullable: true + productIdentifier: + type: string + description: Main product identifier + nullable: true + productRevision: + type: integer + description: Revision of the Product + format: int16 + productName: + type: string + description: Name of the Product + nullable: true + recipePreselection: + type: integer + description: Id of the preselected recipe + format: int64 + overDeliveryAmount: + type: integer + description: Total amount planned for over delivery + format: int32 + underDeliveryAmount: + type: integer + description: Total amount planned for under delivery + format: int32 + plannedStart: + type: string + description: Expected start time + format: date-time + plannedEnd: + type: string + description: Expected end time + format: date-time + targetCycleTime: + type: number + description: Target cycle time for the production of the depending product + format: double + unit: + type: string + description: Unit of product + nullable: true + targetStock: + type: string + description: Target stock for produced parts + nullable: true + parts: + type: array + items: + $ref: '#/components/schemas/PartCreationContext' + description: Part list of the product of this operation + nullable: true + materialParameters: + type: array + items: + $ref: '#/components/schemas/Entry' + description: Additional operation depending parameters for the production + nullable: true + OperationLogMessageModel: + type: object + properties: + logLevel: + $ref: '#/components/schemas/LogLevel' + message: + type: string + nullable: true + exception: + type: string + nullable: true + timeStamp: + type: string + format: date-time + OperationModel: + type: object + properties: + identifier: + type: string + format: uuid + totalAmount: + type: integer + format: int32 + number: + type: string + nullable: true + name: + type: string + nullable: true + overDeliveryAmount: + type: integer + format: int32 + underDeliveryAmount: + type: integer + format: int32 + plannedStart: + type: string + format: date-time + plannedEnd: + type: string + format: date-time + start: + type: string + format: date-time + nullable: true + end: + type: string + format: date-time + nullable: true + targetCycleTime: + type: number + format: double + unit: + type: string + nullable: true + sortOrder: + type: integer + format: int32 + order: + type: string + nullable: true + classification: + $ref: '#/components/schemas/OperationStateClassification' + stateDisplayName: + type: string + nullable: true + productId: + type: integer + format: int64 + productIdentifier: + type: string + nullable: true + productRevision: + type: integer + format: int16 + productName: + type: string + nullable: true + recipeName: + type: string + nullable: true + recipeIds: + type: array + items: + type: integer + format: int64 + nullable: true + jobIds: + type: array + items: + type: integer + format: int64 + nullable: true + reportedSuccessCount: + type: integer + format: int32 + reportedFailureCount: + type: integer + format: int32 + canAssign: + type: boolean + canBegin: + type: boolean + canInterrupt: + type: boolean + canReport: + type: boolean + canAdvice: + type: boolean + isCreated: + type: boolean + isFailed: + type: boolean + isAssigning: + type: boolean + isAborted: + type: boolean + isAmountReached: + type: boolean + runningCount: + type: integer + format: int32 + successCount: + type: integer + format: int32 + scrapCount: + type: integer + format: int32 + pendingCount: + type: integer + format: int32 + progressRunning: + type: integer + format: int32 + progressSuccess: + type: integer + format: int32 + progressScrap: + type: integer + format: int32 + progressPending: + type: integer + format: int32 + hasDocuments: + type: boolean + hasPartList: + type: boolean + operationSource: + $ref: '#/components/schemas/Entry' + description: OrderOperation-DTO to be used with the endpoints + OperationRecipeModel: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + nullable: true + OperationReportedModel: + type: object + properties: + report: + $ref: '#/components/schemas/ReportModel' + operationModel: + $ref: '#/components/schemas/OperationModel' + OperationStartedModel: + type: object + properties: + userId: + type: string + nullable: true + operationModel: + $ref: '#/components/schemas/OperationModel' + OperationStateClassification: + enum: + - Initial + - Assigning + - Failed + - Aborted + - Ready + - Running + - Interrupting + - Interrupted + - Completed + - CanReload + - CanBegin + - CanInterrupt + - CanReport + - CanAdvice + - IsAmountReached + type: string + description: "Enum providing the classification of the internal state machine of the operation for an external representation\r\nThe lowest 8 bits define the state of the operation. The following 16 bits contain flags for the executable\r\nactions on the operation and the trailing 8 bits overall classification information.\r\nBit: 31 - 24 | 23 - 8 | 7 - 0 |\r\nFlag: Overall | Usage | State |" + OperationUpdateModel: + type: object + properties: + sortIndex: + type: integer + format: int32 + nullable: true + plannedStart: + type: string + format: date-time + nullable: true + plannedEnd: + type: string + format: date-time + nullable: true + totalAmount: + type: integer + format: int32 + nullable: true + overDeliveryAmount: + type: integer + format: int32 + nullable: true + underDeliveryAmount: + type: integer + format: int32 + nullable: true + targetCycleTime: + type: number + format: double + nullable: true + targetStock: + type: string + nullable: true + OperatorModel: + type: object + properties: + identifier: + type: string + nullable: true + firstName: + type: string + nullable: true + lastName: + type: string + nullable: true + pseudonym: + type: string + nullable: true + OrderChangedModel: + type: object + properties: + order: + type: string + nullable: true + operation: + type: string + nullable: true + state: + $ref: '#/components/schemas/InternalOperationClassification' + OrderModel: + type: object + properties: + color: + type: string + nullable: true + order: + type: string + nullable: true + operation: + type: string + nullable: true + state: + $ref: '#/components/schemas/InternalOperationClassification' + OrderReferenceModel: + type: object + properties: + order: + type: string + nullable: true + operation: + type: string + nullable: true + PartClassification: + enum: + - Unknown + - Material + - InfoComponent + - CarrierMaterial + - ScrapMaterial + - BranchMaterial + type: string + PartConnector: + type: object + properties: + name: + type: string + nullable: true + displayName: + type: string + nullable: true + type: + type: string + nullable: true + isCollection: + type: boolean + parts: + type: array + items: + $ref: '#/components/schemas/PartModel' + nullable: true + propertyTemplates: + $ref: '#/components/schemas/Entry' + PartCreationContext: + type: object + properties: + name: + type: string + description: Name of the part like the product name + nullable: true + number: + type: string + description: Identifier of this part + nullable: true + quantity: + type: number + description: Quantity of this part which are necessary to produce one product + format: double + unit: + type: string + description: Unit of the quantity + nullable: true + stagingIndicator: + $ref: '#/components/schemas/StagingIndicator' + classification: + $ref: '#/components/schemas/PartClassification' + description: Information about a part of the product which should be produced for an operation + PartModel: + type: object + properties: + id: + type: integer + format: int64 + properties: + $ref: '#/components/schemas/Entry' + product: + $ref: '#/components/schemas/ProductModel' + Position: + type: object + properties: + positionX: + type: number + format: double + positionY: + type: number + format: double + PreviewDescriptor: + type: object + properties: + state: + $ref: '#/components/schemas/PreviewState' + fileHash: + type: string + nullable: true + extension: + type: string + nullable: true + mimeType: + type: string + nullable: true + size: + type: integer + format: int64 + description: Descriptor for an preview + PreviewState: + enum: + - Creating + - Created + - Failed + - Unsupported + - Removed + type: string + description: State of the preview + ProblemDetails: + type: object + properties: + type: + type: string + nullable: true + title: + type: string + nullable: true + status: + type: integer + format: int32 + nullable: true + detail: + type: string + nullable: true + instance: + type: string + nullable: true + ProcessActivityModel: + type: object + properties: + id: + type: integer + format: int64 + resource: + $ref: '#/components/schemas/ActivityResourceModel' + type: + type: string + nullable: true + state: + type: string + nullable: true + classification: + $ref: '#/components/schemas/ActivityClassification' + requiredCapabilities: + type: string + nullable: true + possibleResources: + type: array + items: + $ref: '#/components/schemas/ActivityResourceModel' + nullable: true + result: + type: integer + format: int64 + nullable: true + resultName: + type: string + nullable: true + instanceId: + type: integer + format: int64 + nullable: true + tracing: + $ref: '#/components/schemas/TracingModel' + isCompleted: + type: boolean + ProcessHolderGroupModel: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + nullable: true + isEmpty: + type: boolean + positions: + type: array + items: + $ref: '#/components/schemas/ProcessHolderPositionModel' + nullable: true + visualization: + $ref: '#/components/schemas/VisualizationModel' + ProcessHolderPositionModel: + type: object + properties: + id: + type: integer + format: int64 + groupId: + type: integer + format: int64 + name: + type: string + nullable: true + position: + type: integer + format: int32 + activity: + type: string + nullable: true + order: + type: string + nullable: true + process: + type: string + nullable: true + isEmpty: + type: boolean + ProcessProgress: + enum: + - Ready + - Running + - Interrupted + - Completed + type: string + description: Enum representing the progress of a process within the kernel + ProductCustomization: + type: object + properties: + productTypes: + type: array + items: + $ref: '#/components/schemas/ProductDefinitionModel' + nullable: true + recipeTypes: + type: array + items: + $ref: '#/components/schemas/RecipeDefinitionModel' + nullable: true + importers: + type: array + items: + $ref: '#/components/schemas/ProductImporter' + nullable: true + ProductDefinitionModel: + type: object + properties: + name: + type: string + nullable: true + displayName: + type: string + nullable: true + baseDefinition: + type: string + nullable: true + properties: + $ref: '#/components/schemas/Entry' + ProductImporter: + type: object + properties: + name: + type: string + nullable: true + parameters: + $ref: '#/components/schemas/Entry' + ProductInstanceModel: + type: object + properties: + id: + type: integer + format: int64 + type: + type: string + description: The name of the product type of this instance + nullable: true + state: + $ref: '#/components/schemas/ProductInstanceState' + properties: + $ref: '#/components/schemas/Entry' + ProductInstanceState: + enum: + - Unset + - InProduction + - Paused + - Success + - Failure + type: string + description: "The state of an ProductInstance.\r\nThis will not occupy more than 4 Bits. Other enums can be added by bit-shifting" + ProductionJobModel: + type: object + properties: + productIdentity: + type: string + nullable: true + amount: + type: integer + format: int32 + successCount: + type: integer + format: int32 + failureCount: + type: integer + format: int32 + runningCount: + type: integer + format: int32 + reworkedCount: + type: integer + format: int32 + ProductModel: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + nullable: true + state: + $ref: '#/components/schemas/ProductState' + identifier: + type: string + nullable: true + revision: + type: integer + format: int16 + type: + type: string + nullable: true + properties: + $ref: '#/components/schemas/Entry' + parts: + type: array + items: + $ref: '#/components/schemas/PartConnector' + nullable: true + recipes: + type: array + items: + $ref: '#/components/schemas/RecipeModel' + nullable: true + ProductPartModel: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + nullable: true + identifier: + type: string + nullable: true + quantity: + type: number + format: double + unit: + type: string + nullable: true + stagingIndicator: + $ref: '#/components/schemas/StagingIndicator' + classification: + $ref: '#/components/schemas/PartClassification' + ProductQuery: + type: object + properties: + includeDeleted: + type: boolean + description: Flag if deleted products should be included in the query + typeName: + type: string + description: Product types to filter by + nullable: true + excludeDerivedTypes: + type: boolean + description: When filtering by type exclude derived types and only return specific matches + identifier: + type: string + description: Material identifiers + nullable: true + requiredState: + oneOf: + - enum: + - null + nullable: true + - $ref: '#/components/schemas/ProductState' + revisionFilter: + $ref: '#/components/schemas/RevisionFilter' + name: + type: string + description: Material identifiers + nullable: true + revision: + type: integer + description: "Optional specific revision if RevisionFilter ProductQuery.RevisionFilter is set to\r\nRevisionFilter.Specific" + format: int16 + recipeFilter: + $ref: '#/components/schemas/RecipeFilter' + selector: + $ref: '#/components/schemas/Selector' + propertyFilters: + type: array + items: + $ref: '#/components/schemas/PropertyFilter' + description: List of property filters + nullable: true + loadFullTypeInformation: + type: boolean + description: "If set to true, product queries return fully populated product types.\r\nOtherwise only the basic type information is returned." + description: Filter to fetch products from the product management + ProductState: + enum: + - Created + - Released + - Deprecated + - Generated + type: string + description: Current state of a product + PropertyFilter: + type: object + properties: + entry: + $ref: '#/components/schemas/Entry' + operator: + $ref: '#/components/schemas/PropertyFilterOperator' + description: Property filter wrapper for the filtered entry + PropertyFilterOperator: + enum: + - Equals + - GreaterThen + - LessThen + type: string + description: Property filter operator expression + RecipeClassificationModel: + enum: + - Unset + - Default + - Alternative + - Intermediate + - Part + type: string + description: Webservice compatible recipe classification enum + RecipeDefinitionModel: + type: object + properties: + name: + type: string + nullable: true + displayName: + type: string + nullable: true + hasWorkplans: + type: boolean + RecipeFilter: + enum: + - Unset + - WithRecipe + - WithoutRecipes + type: string + description: Different options regarding the recipes of the product + RecipeModel: + type: object + properties: + id: + type: integer + description: Id of the recipe + format: int64 + name: + type: string + description: Name of the recipe + nullable: true + state: + $ref: '#/components/schemas/RecipeState' + revision: + type: integer + description: Revision of the recipe + format: int32 + type: + type: string + description: Type of the recipe + nullable: true + properties: + $ref: '#/components/schemas/Entry' + workplanModel: + $ref: '#/components/schemas/WorkplanModel' + classification: + $ref: '#/components/schemas/RecipeClassificationModel' + isClone: + type: boolean + description: Whether this Recipe is a clone or not + description: DTO representation of a recipe + RecipeState: + enum: + - New + - Released + - Revoked + type: string + description: A Recipe's state + ReferenceFilter: + type: object + properties: + name: + type: string + description: Name of the reference + nullable: true + relationType: + $ref: '#/components/schemas/ResourceRelationType' + role: + $ref: '#/components/schemas/ResourceReferenceRole' + valueConstraint: + $ref: '#/components/schemas/ReferenceValue' + description: Filter criteria for required or requested references + ReferenceTypeModel: + type: object + properties: + name: + type: string + description: 'Name of the reference, usually name of the property' + nullable: true + isCollection: + type: boolean + description: Flag if this reference is a collection + displayName: + type: string + description: Display name of the reference + nullable: true + description: + type: string + description: Description of this reference + nullable: true + isRequired: + type: boolean + description: Reference is required and must be set + supportedTypes: + type: array + items: + type: string + description: Types that can be assigned to this reference + nullable: true + role: + $ref: '#/components/schemas/ResourceReferenceRole' + relationType: + $ref: '#/components/schemas/ResourceRelationType' + description: Type model for a reference property on a resource type + ReferenceValue: + enum: + - Irrelevant + - NullOrEmpty + - NotEmpty + type: string + description: Enum to classify the current value of the reference property + ReportContext: + type: object + properties: + canPartial: + type: boolean + description: If `true` the operation can be reported partially + canFinal: + type: boolean + description: If `true` the operation can be reported finally + reportedSuccess: + type: integer + description: Currently reported success count + format: int32 + reportedFailure: + type: integer + description: Currently reported failure count + format: int32 + unreportedSuccess: + type: integer + description: Value of unreported success parts + format: int32 + unreportedFailure: + type: integer + description: Value of unreported failure parts + format: int32 + restrictions: + type: array + items: + $ref: '#/components/schemas/RestrictionDescription' + description: Reasons why a report is not possible + nullable: true + successCount: + type: integer + description: Current success count of the operation + format: int32 + scrapCount: + type: integer + description: Current failure count of the operation + format: int32 + description: Report which is not processed. + ReportModel: + type: object + properties: + confirmationType: + $ref: '#/components/schemas/ConfirmationType' + comment: + type: string + nullable: true + successCount: + type: integer + format: int32 + failureCount: + type: integer + format: int32 + userIdentifier: + type: string + nullable: true + ResourceChangedModel: + type: object + properties: + cellName: + type: string + nullable: true + cellIconName: + type: string + nullable: true + cellImageURL: + type: string + nullable: true + id: + type: integer + format: int64 + cellLocation: + $ref: '#/components/schemas/CellLocationModel' + cellPropertySettings: + type: object + additionalProperties: + $ref: '#/components/schemas/CellPropertySettings' + nullable: true + factoryId: + type: integer + format: int64 + location: + $ref: '#/components/schemas/CellLocationModel' + iconName: + type: string + nullable: true + isACell: + type: boolean + ResourceModel: + type: object + properties: + id: + type: integer + description: Id of the resource. + format: int64 + referenceId: + type: integer + description: Reference id in case of recursion in the returned model + format: int64 + name: + type: string + description: Name of the resource. + nullable: true + description: + type: string + description: Description of the resource + nullable: true + type: + type: string + description: Resource type model reference + nullable: true + partiallyLoaded: + type: boolean + description: "Indicates that this model does not represent the full\r\nresource but only its key properties" + properties: + $ref: '#/components/schemas/Entry' + methods: + type: array + items: + $ref: '#/components/schemas/MethodEntry' + description: User callable methods for instances of this type + nullable: true + references: + type: array + items: + $ref: '#/components/schemas/ResourceReferenceModel' + description: 'References of this resource, including children' + nullable: true + description: Base model used by details view and tree + ResourceQuery: + type: object + properties: + types: + type: array + items: + type: string + description: Type constraints to filter instances + nullable: true + referenceCondition: + $ref: '#/components/schemas/ReferenceFilter' + referenceRecursion: + type: boolean + description: Flag if included references should be processed recursively + includedReferences: + type: array + items: + $ref: '#/components/schemas/ReferenceFilter' + description: References that should be included in the response + nullable: true + description: Filter object to fetch resources from the server + ResourceReferenceModel: + type: object + properties: + name: + type: string + description: 'Name of the reference, usually name of the property' + nullable: true + targets: + type: array + items: + $ref: '#/components/schemas/ResourceModel' + description: Targets of this reference + nullable: true + description: DTO that represents the reference of one resource with another + ResourceReferenceRole: + enum: + - Target + - Source + type: string + description: Role of a resource in a relation decorated with the ResourceReferenceAttribute + ResourceRelationType: + enum: + - Unset + - Aggregation + - Composition + - Usage + - ParentChild + - Driver + - TransportSystem + - TransportRoute + - CurrentExchangeablePart + - PossibleExchangeablePart + - Decorated + - Extension + - Custom + type: string + description: "Enum representing the relation between two entities and definition of their life cycle coupling.\r\nThe lowest 3 bits define the UML association type. The other 29 bits are for free use\r\nBit: 31 - 3 | 2 | 1 | 0\r\nFlag: Type | Usage | Composition | Aggregation\r\nUsage: Pick a number and bitshift it by 3 and add the UML type, e.g. 42 => (42 << 3) + 1" + ResourceTypeModel: + type: object + properties: + name: + type: string + description: The name of the resource type. + nullable: true + displayName: + type: string + description: Display name of this resource type + nullable: true + creatable: + type: boolean + description: Flag that this type is registered and can be instantiated + description: + type: string + description: Description of this resource type + nullable: true + constructors: + type: array + items: + $ref: '#/components/schemas/MethodEntry' + description: Resource constructors used to build new instances + nullable: true + references: + type: array + items: + $ref: '#/components/schemas/ReferenceTypeModel' + description: Reference properties of this type + nullable: true + baseType: + type: string + description: Back reference to the base type + nullable: true + derivedTypes: + type: array + items: + $ref: '#/components/schemas/ResourceTypeModel' + description: Types derived from this type + nullable: true + description: Type item for the tree + RestrictionDescription: + required: + - text + - severity + type: object + properties: + text: + type: string + description: Description of the result + nullable: true + severity: + $ref: '#/components/schemas/RestrictionSeverity' + description: Description of the result of a performed rule + RestrictionSeverity: + enum: + - Info + - Warning + - Error + type: string + description: Severity of a rule result + RevisionFilter: + enum: + - All + - Latest + - Specific + type: string + description: Filter for revisions + SaveConfigRequest: + type: object + properties: + config: + $ref: '#/components/schemas/Config' + updateMode: + $ref: '#/components/schemas/ConfigUpdateMode' + Selector: + enum: + - Direct + - Parent + - Parts + type: string + description: Determine which objects to select for the query + SerializableException: + type: object + properties: + exceptionTypeName: + type: string + nullable: true + message: + type: string + nullable: true + stackTrace: + type: string + nullable: true + innerException: + $ref: '#/components/schemas/SerializableException' + ServerModuleModel: + type: object + properties: + name: + type: string + nullable: true + healthState: + $ref: '#/components/schemas/ServerModuleState' + startBehaviour: + $ref: '#/components/schemas/ModuleStartBehaviour' + failureBehaviour: + $ref: '#/components/schemas/FailureBehaviour' + dependencies: + type: array + items: + $ref: '#/components/schemas/ServerModuleModel' + nullable: true + notifications: + type: array + items: + $ref: '#/components/schemas/ModuleNotificationModel' + nullable: true + assembly: + $ref: '#/components/schemas/AssemblyModel' + ServerModuleState: + enum: + - Stopped + - Ready + - Initializing + - Starting + - Failure + - Missing + - Running + - Stopping + type: string + description: Different health states a server module can have + ServerTimeResponse: + type: object + properties: + serverTime: + type: string + nullable: true + SetupJobClassification: + enum: + - None + - Prepare + - Cleanup + - Manual + type: string + SetupJobModel: + type: object + properties: + classification: + $ref: '#/components/schemas/SetupJobClassification' + targetRecipeId: + type: integer + format: int64 + steps: + type: array + items: + $ref: '#/components/schemas/SetupStepModel' + nullable: true + SetupModel: + type: object + properties: + fullname: + type: string + nullable: true + sortOrder: + type: integer + format: int32 + name: + type: string + nullable: true + description: + type: string + nullable: true + supportedFileRegex: + type: string + nullable: true + setupData: + type: string + nullable: true + SetupStepModel: + type: object + properties: + name: + type: string + nullable: true + state: + $ref: '#/components/schemas/StepState' + Severity: + enum: + - Info + - Warning + - Error + - Fatal + type: string + description: Different levels to differentiate the severity of a message + ShiftAssignementCreationContextModel: + type: object + properties: + resourceId: + type: integer + format: int64 + shiftId: + type: integer + format: int64 + operatorIdentifier: + type: string + nullable: true + note: + type: string + nullable: true + priority: + type: integer + format: int32 + assignedDays: + $ref: '#/components/schemas/AssignedDays' + ShiftAssignementModel: + type: object + properties: + id: + type: integer + format: int64 + resourceId: + type: integer + format: int64 + operatorIdentifier: + type: string + nullable: true + shiftId: + type: integer + format: int64 + note: + type: string + nullable: true + priority: + type: integer + format: int32 + assignedDays: + $ref: '#/components/schemas/AssignedDays' + ShiftCreationContextModel: + type: object + properties: + typeId: + type: integer + format: int64 + date: + type: string + format: date + ShiftModel: + type: object + properties: + id: + type: integer + format: int64 + typeId: + type: integer + format: int64 + date: + type: string + format: date + ShiftTypeCreationContextModel: + type: object + properties: + name: + type: string + nullable: true + startTime: + type: string + format: time + endtime: + type: string + format: time + periode: + type: integer + format: uint8 + ShiftTypeModel: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + nullable: true + startTime: + type: string + format: time + endtime: + type: string + format: time + periode: + type: integer + format: uint8 + SkillCreationContextModel: + type: object + properties: + obtainedOn: + type: string + format: date + typeId: + type: integer + format: int64 + operatorIdentifier: + type: string + nullable: true + SkillModel: + type: object + properties: + id: + type: integer + format: int64 + obtainedOn: + type: string + format: date + expiresOn: + type: string + format: date + typeId: + type: integer + format: int64 + operatorIdentifier: + type: string + nullable: true + isExpired: + type: boolean + SkillTypeCreationContextModel: + type: object + properties: + name: + type: string + nullable: true + duration: + pattern: '^-?(\d+\.)?\d{2}:\d{2}:\d{2}(\.\d{1,7})?$' + type: string + capabilities: + oneOf: + - enum: + - null + nullable: true + - $ref: '#/components/schemas/Entry' + SkillTypeModel: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + nullable: true + duration: + pattern: '^-?(\d+\.)?\d{2}:\d{2}:\d{2}(\.\d{1,7})?$' + type: string + capabilities: + oneOf: + - enum: + - null + nullable: true + - $ref: '#/components/schemas/Entry' + SseItemBase: + type: object + properties: + type: + type: string + eventId: + type: string + reconnectInterval: + pattern: '^-?(\d+\.)?\d{2}:\d{2}:\d{2}(\.\d{1,7})?$' + type: string + SseItemOfOperationAdvicedModel: + allOf: + - $ref: '#/components/schemas/SseItemBase' + properties: + data: + $ref: '#/components/schemas/OperationAdvicedModel' + SseItemOfOperationModel: + allOf: + - $ref: '#/components/schemas/SseItemBase' + properties: + data: + $ref: '#/components/schemas/OperationModel' + SseItemOfOperationReportedModel: + allOf: + - $ref: '#/components/schemas/SseItemBase' + properties: + data: + $ref: '#/components/schemas/OperationReportedModel' + SseItemOfOperationStartedModel: + allOf: + - $ref: '#/components/schemas/SseItemBase' + properties: + data: + $ref: '#/components/schemas/OperationStartedModel' + StagingIndicator: + enum: + - NotRelevant + - PickPart + - CrateOrKanbanPart + - ReleaseOrderPart + - ManualStaging + - EwmStaging + type: string + description: "The material staging indicator defines the method of how needed materials can be supplied for production with the assistance of the Warehouse Management system.\r\nAs with the location coordinates(warehouse number, storage type, and storage bin), the system files this indicator in the control cycle." + StepState: + enum: + - Initial + - Running + - Completed + type: string + TestConnectionResponse: + type: object + properties: + result: + $ref: '#/components/schemas/TestConnectionResult' + TestConnectionResult: + enum: + - ConfigurationError + - ConnectionError + - ConnectionOkDbDoesNotExist + - PendingMigrations + - Success + type: string + description: Result enum for function TestConnection + TracingModel: + type: object + properties: + type: + type: string + nullable: true + text: + type: string + nullable: true + started: + type: string + format: date-time + nullable: true + completed: + type: string + format: date-time + nullable: true + errorCode: + type: integer + format: int32 + properties: + $ref: '#/components/schemas/Entry' + TransportRouteModel: + type: object + properties: + idCellOfOrigin: + type: integer + format: int64 + idCellOfDestination: + type: integer + format: int64 + paths: + type: array + items: + $ref: '#/components/schemas/Position' + nullable: true + ValidationErrorModel: + type: object + properties: + error: + type: string + nullable: true + position: + type: integer + format: int64 + ValidationResultModel: + type: object + properties: + success: + type: boolean + errors: + type: array + items: + $ref: '#/components/schemas/ValidationErrorModel' + nullable: true + VariantDescriptor: + type: object + properties: + name: + type: string + description: Name of the variant + nullable: true + creationDate: + type: string + description: Date of the creation + format: date-time + preview: + $ref: '#/components/schemas/PreviewDescriptor' + fileHash: + type: string + nullable: true + extension: + type: string + nullable: true + mimeType: + type: string + nullable: true + size: + type: integer + format: int64 + description: Descriptor for an variant + VisualizableItemModel: + type: object + properties: + id: + type: integer + format: int64 + location: + $ref: '#/components/schemas/CellLocationModel' + iconName: + type: string + nullable: true + isACell: + type: boolean + VisualizationModel: + type: object + properties: + icon: + type: string + nullable: true + category: + $ref: '#/components/schemas/Category' + WorkplanModel: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + nullable: true + version: + type: integer + format: int32 + state: + $ref: '#/components/schemas/WorkplanState' + WorkplanNodeClassification: + enum: + - Input + - Output + - Execution + - ControlFlow + - Subworkplan + type: string + WorkplanNodeModel: + type: object + properties: + id: + type: integer + format: int64 + type: + type: string + nullable: true + name: + type: string + nullable: true + displayName: + type: string + nullable: true + positionTop: + type: integer + format: int32 + positionLeft: + type: integer + format: int32 + classification: + $ref: '#/components/schemas/WorkplanNodeClassification' + inputs: + type: array + items: + $ref: '#/components/schemas/NodeConnectionPoint' + nullable: true + outputs: + type: array + items: + $ref: '#/components/schemas/NodeConnectionPoint' + nullable: true + properties: + $ref: '#/components/schemas/Entry' + subworkplanId: + type: integer + format: int64 + WorkplanSessionModel: + type: object + properties: + sessionToken: + type: string + nullable: true + workplanId: + type: integer + format: int64 + name: + type: string + nullable: true + version: + type: integer + format: int32 + state: + $ref: '#/components/schemas/WorkplanState' + nodes: + type: array + items: + $ref: '#/components/schemas/WorkplanNodeModel' + nullable: true + WorkplanState: + enum: + - New + - Released + - Revoked + type: string + description: A workplan state + WorkplanStepRecipe: + type: object + properties: + type: + type: string + nullable: true + name: + type: string + nullable: true + description: + type: string + nullable: true + positionTop: + type: integer + format: int32 + positionLeft: + type: integer + format: int32 + classification: + $ref: '#/components/schemas/WorkplanNodeClassification' + constructor: + $ref: '#/components/schemas/MethodEntry' + subworkplanId: + type: integer + format: int64 +tags: + - name: Common + - name: Database + - name: FactoryMonitor + - name: JobManagement + - name: MediaServer + - name: Modules + - name: NotificationPublisher + - name: OperatorManagement + - name: OrderManagement + - name: ProcessEngine + - name: ProductManagement + - name: ResourceModification + - name: ShiftManagement + - name: SkillManagement + - name: Test + - name: VisualInstructions + - name: Workplan + - name: WorkplanEditing \ No newline at end of file diff --git a/src/Moryx.AbstractionLayer.Products.Endpoints/ProductManagementController.cs b/src/Moryx.AbstractionLayer.Products.Endpoints/ProductManagementController.cs index a384ebd2f3..a6cc977b4e 100644 --- a/src/Moryx.AbstractionLayer.Products.Endpoints/ProductManagementController.cs +++ b/src/Moryx.AbstractionLayer.Products.Endpoints/ProductManagementController.cs @@ -6,14 +6,14 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; -using Moryx.AbstractionLayer.Recipes; -using Moryx.Tools; -using Moryx.Serialization; using Moryx.AbstractionLayer.Products.Endpoints.Models; using Moryx.AbstractionLayer.Products.Endpoints.Properties; +using Moryx.AbstractionLayer.Recipes; using Moryx.AspNetCore; using Moryx.Configuration; using Moryx.Runtime.Modules; +using Moryx.Serialization; +using Moryx.Tools; namespace Moryx.AbstractionLayer.Products.Endpoints; @@ -43,6 +43,9 @@ public ProductManagementController(IProductManagement productManagement, } #region importers + /// + /// Loads dataset of existing products, recipes and importers for the UI + /// [HttpGet] [Route("configuration")] [Authorize(Policy = ProductPermissions.CanViewTypes)] @@ -78,6 +81,11 @@ private RecipeDefinitionModel[] GetRecipeTypes() return typeModels.ToArray(); } + /// + /// Run the product importer with the given parameters + /// + /// Name of the importer + /// Parameters for the importer [HttpPost] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] @@ -111,6 +119,11 @@ private object ConvertParametersBack(string importerName, Entry currentParameter #endregion #region product type + /// + /// Store the product type in the database + /// + /// Model of the new product + /// The assigned database id of the product [HttpPost] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] @@ -129,6 +142,10 @@ public async Task> SaveType(ProductModel newTypeModel) return await _productManagement.SaveTypeAsync(newType); } + /// + /// Retrieves all product types, if no identity is specified. Otherwise the model identified by that id is returned + /// + /// Optional. The id to look for [HttpGet] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] @@ -160,6 +177,11 @@ await _productConverter.ConvertProduct(productType, false) }; } + /// + /// Query the product type database + /// + /// Query parameters + /// The products models matching the query [HttpPost] [Route("types/query")] [Authorize(Policy = ProductPermissions.CanViewTypes)] @@ -174,6 +196,10 @@ public async Task> GetTypes(ProductQuery query) return productModels.ToArray(); } + /// + /// Get's a product type using the database id + /// + /// Database id [HttpGet] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] @@ -197,6 +223,11 @@ public async Task> GetTypeById(long id) return await _productConverter.ConvertProduct(productType, false); } + /// + /// Deletes the product type with the given id + /// + /// + /// [HttpDelete] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status404NotFound)] @@ -210,6 +241,11 @@ public async Task> DeleteType(long id) return result; } + /// + /// Updates the existing product type + /// + /// Database id of the product type + /// New product model [HttpPut] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] @@ -226,6 +262,11 @@ public async Task> UpdateType(long id, ProductModel modifiedT return await _productManagement.SaveTypeAsync(type); } + /// + /// Create a clone of the product type identified with the id with the new identitiy + /// + /// Database id of the existing product type + /// Product identifier of the new product [HttpPost] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] @@ -256,6 +297,11 @@ public async Task> Duplicate(long id, [FromBody] stri return await _productConverter.ConvertProduct(newProductType, false); } + /// + /// Loads the recipe attached to the product type with the id + /// + /// Database id + /// Recipe classification [HttpGet] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] @@ -275,6 +321,11 @@ public async Task> GetRecipes(long id, int classific #endregion #region product instances + /// + /// Get's the product instance with the given id + /// + /// Database id of the product instance + /// [HttpGet] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] @@ -291,6 +342,10 @@ public async Task> GetInstance(long id) return ProductConverter.ConvertProductInstance(productInstance); } + /// + /// Loads multiple product instances at once + /// + /// A list of product instance ids [HttpGet] [Route("instances")] [Authorize(Policy = ProductPermissions.CanViewInstances)] @@ -303,6 +358,12 @@ public async Task> GetInstances([FromQuery] return modelList.ToArray(); } + /// + /// Create a new product instace of the product type identified via the identifier and revision + /// + /// Product identifier + /// Revision of the product + /// If save is false, the new instance won't be stored in the db [HttpPost] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] @@ -318,6 +379,10 @@ public async Task> CreateInstance(string iden return ProductConverter.ConvertProductInstance(instance); } + /// + /// Save the instance in the product db + /// + /// Model of the product instance [HttpPut] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] @@ -339,6 +404,11 @@ public async Task SaveInstance(ProductInstanceModel instanceModel) #endregion #region recipes + /// + /// Get's a recipe by it's db id + /// + /// Database id of the recipe + /// [HttpGet] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] @@ -355,6 +425,11 @@ public async Task> GetRecipe(long id) return _productConverter.ConvertRecipe(recipe); } + /// + /// Saves a new recipe in the database + /// + /// Model of the recipe + /// The database id of the newly created recipe [HttpPost] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] @@ -373,6 +448,11 @@ public async Task> SaveRecipe(RecipeModel recipe) return await _productManagement.SaveRecipeAsync(await _productConverter.ConvertRecipeBack(recipe, productRecipe, null)); } + /// + /// Updates the existing recipes + /// + /// Database id of the recipe + /// Updated recipe model [HttpPut] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] diff --git a/src/Moryx.AspNetCore.OpenApi/EnumSchemaTransformer.cs b/src/Moryx.AspNetCore.OpenApi/EnumSchemaTransformer.cs new file mode 100644 index 0000000000..07f9f0daa3 --- /dev/null +++ b/src/Moryx.AspNetCore.OpenApi/EnumSchemaTransformer.cs @@ -0,0 +1,39 @@ +// Copyright (c) 2026 Phoenix Contact GmbH & Co. KG +// Licensed under the Apache License, Version 2.0 + +using System.Reflection; +using System.Text.Json; +using System.Text.Json.Nodes; +using Microsoft.AspNetCore.OpenApi; +using Microsoft.OpenApi; + +namespace Moryx.AspNetCore.OpenApi; + +internal class EnumSchemaTransformer : IOpenApiSchemaTransformer +{ + public async Task TransformAsync(OpenApiSchema schema, OpenApiSchemaTransformerContext context, CancellationToken cancellationToken) + { + if (!context.JsonTypeInfo.Type.IsEnum) + { + return; + } + // Set enum values for flage nums, because otherwise the information about possible keys is completely lost in the spec + // It's not really correct, because technically other values than the pure enum cases are accepted + await SetEnumValuesForFlagEnums(schema, context, cancellationToken); + + // set schema.Type because ng-openapi-gen will create unions instead of enums if not set + if (schema.Type == null && schema.Enum.All(e => e.GetValueKind() == JsonValueKind.String)) + { + schema.Type = JsonSchemaType.String; + } + } + public async Task SetEnumValuesForFlagEnums(OpenApiSchema schema, OpenApiSchemaTransformerContext context, CancellationToken cancellationToken) + { + if (schema.Enum != null || context.JsonTypeInfo.Type.GetCustomAttributes() is null) + { + return; + } + schema.Enum = Enum.GetNames(context.JsonTypeInfo.Type) + .Select(t => JsonValue.Create(t)).ToArray(); + } +} diff --git a/src/Moryx.AspNetCore.OpenApi/FileStreamSchemaTransformer.cs b/src/Moryx.AspNetCore.OpenApi/FileStreamSchemaTransformer.cs new file mode 100644 index 0000000000..09f9fc69dd --- /dev/null +++ b/src/Moryx.AspNetCore.OpenApi/FileStreamSchemaTransformer.cs @@ -0,0 +1,40 @@ +// Copyright (c) 2026 Phoenix Contact GmbH & Co. KG +// Licensed under the Apache License, Version 2.0 + +using System.IO.Pipelines; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Http.HttpResults; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.OpenApi; +using Microsoft.OpenApi; + +namespace Moryx.AspNetCore.OpenApi; + +internal class FileStreamSchemaTransformer : IOpenApiSchemaTransformer +{ + public async Task TransformAsync(OpenApiSchema schema, OpenApiSchemaTransformerContext context, CancellationToken cancellationToken) + { + var type = context.JsonTypeInfo.Type; + // Lightly adapted from https://github.com/dotnet/aspnetcore/blob/2e65b75b42210ac4e9f8314e0d6910ede3035dad/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs#L62 + // Fix up schemas generated for IFormFile, IFormFileCollection, Stream, PipeReader, + // FileContentResult, FileStreamResult, FileContentHttpResult and FileStreamHttpResult + // that appear as properties within complex types. + if (type == typeof(IFormFile) || type == typeof(Stream) || type == typeof(PipeReader) + || type == typeof(FileContentResult) || type == typeof(FileStreamResult) + || type == typeof(FileContentHttpResult) || type == typeof(FileStreamHttpResult)) + { + schema.Type = JsonSchemaType.String; + schema.Properties = null; + schema.Format = "binary"; + } + else if (type == typeof(IFormFileCollection)) + { + schema.Type = JsonSchemaType.Array; + schema.Items = new OpenApiSchema + { + Type = JsonSchemaType.String, + Format = "binary", + }; + } + } +} diff --git a/src/Moryx.AspNetCore.OpenApi/Moryx.AspNetCore.OpenApi.csproj b/src/Moryx.AspNetCore.OpenApi/Moryx.AspNetCore.OpenApi.csproj new file mode 100644 index 0000000000..5700b0580d --- /dev/null +++ b/src/Moryx.AspNetCore.OpenApi/Moryx.AspNetCore.OpenApi.csproj @@ -0,0 +1,25 @@ + + + + net10.0 + true + Extensions for the integration of MORYX in ASP.NET Core + MORYX;ASP + true + Moryx.AspNetCore.OpenApi + + + + + + + + + + + + + + + + diff --git a/src/Moryx.AspNetCore.OpenApi/MoryxOpenApiDocumentTransformer.cs b/src/Moryx.AspNetCore.OpenApi/MoryxOpenApiDocumentTransformer.cs new file mode 100644 index 0000000000..6eb77e7f63 --- /dev/null +++ b/src/Moryx.AspNetCore.OpenApi/MoryxOpenApiDocumentTransformer.cs @@ -0,0 +1,70 @@ +// Copyright (c) 2026 Phoenix Contact GmbH & Co. KG +// Licensed under the Apache License, Version 2.0 + +using Microsoft.AspNetCore.OpenApi; +using Microsoft.OpenApi; + +namespace Moryx.AspNetCore.OpenApi; + +/// +/// Document transformer to improve our API documentation +/// +internal class MoryxOpenApiDocumentTransformer : IOpenApiDocumentTransformer +{ + /// + public async Task TransformAsync(OpenApiDocument document, OpenApiDocumentTransformerContext context, CancellationToken cancellationToken) + { + SortPathEntries(document); + + EnsureSseItemBaseExists(document); + } + + /// + /// Sort path entries by tag + /// + /// + private static void SortPathEntries(OpenApiDocument document) + { + var path = new OpenApiPaths(); + var sortLookup = new Dictionary(); + document.Tags = document.Tags.OrderBy(t => t.Name).ToHashSet(); + + var sorted = document.Paths.OrderBy((p) => + { + if (p.Value.Operations.Count == 0) + { + return ""; + } + + var op = p.Value.Operations.First().Value; + return op.Tags.FirstOrDefault()?.Name ?? ""; + }); + + foreach (var item in sorted) + { + path.Add(item.Key, item.Value); + } + + document.Paths = path; + } + + private static void EnsureSseItemBaseExists(OpenApiDocument document) + { + var sseItemBaseSchema = new OpenApiSchema() + { + Type = JsonSchemaType.Object, + Properties = new Dictionary() + { + { "type", new OpenApiSchema() { Type = JsonSchemaType.String } }, + { "eventId", new OpenApiSchema() { Type = JsonSchemaType.String } }, + { "reconnectInterval", new OpenApiSchema() + { + Type = JsonSchemaType.String, + Pattern = "^-?(\\d+\\.)?\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,7})?$", + } + } + } + }; + document.AddComponent(SseOperationTransformer.SseItemBaseSchemaId, sseItemBaseSchema); + } +} diff --git a/src/Moryx.AspNetCore.OpenApi/OpenApiExtensions.cs b/src/Moryx.AspNetCore.OpenApi/OpenApiExtensions.cs new file mode 100644 index 0000000000..ce067a2657 --- /dev/null +++ b/src/Moryx.AspNetCore.OpenApi/OpenApiExtensions.cs @@ -0,0 +1,84 @@ +// Copyright (c) 2026 Phoenix Contact GmbH & Co. KG +// Licensed under the Apache License, Version 2.0 + +using System.Reflection; +using Microsoft.AspNetCore.OpenApi; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.OpenApi; + +namespace Moryx.AspNetCore.OpenApi; + +public static class OpenApiExtensions +{ + extension(OpenApiOptions options) + { + public OpenApiOptions ConfigureMoryxTransformers() + { + options.AddDocumentTransformer(); + options.AddOperationTransformer(); + options.AddOperationTransformer(); + options.AddOperationTransformer(); + options.AddSchemaTransformer(); + options.AddSchemaTransformer(); + return options; + } + } + extension(IHostEnvironment env) + { + /// + /// Extension to make it fit in with IsDevelopment, IsProduction that are common in asp.net core + /// + /// + public bool IsOpenApiBuildTime() + { + if (string.Compare(env.EnvironmentName, "OpenApiBuildTime", StringComparison.OrdinalIgnoreCase) == 0) + { + return true; + } + // If the environment name is not set, fallback to detecting the entry point + // Taken from https://github.com/dotnet/AspNetCore.Docs/blob/2c37585a425dd64e91015e60146031859ff52865/aspnetcore/fundamentals/openapi/samples/9.x/AspireApp1/AspireApp1.Web/Program.cs#L5 + // according to https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/fundamentals/openapi/aspnetcore-openapi.md#customize-runtime-behavior-during-build-time-document-generation + return Assembly.GetEntryAssembly()?.GetName().Name == "GetDocument.Insider"; + + } + } + extension(IServiceProvider services) + { + /// + /// Writes an openapi yaml spec for the specified document key + /// to the output location identified by path and file name. + /// + /// Filename of the generated spec with extension i.e. 'framework-api.yaml' + /// Folder in which to place the spec. Can be infered from the command line args if it's running as part of the Microsoft.Extensions.ApiDescription.Server + /// The document to generate the spec of. Defaults to the standard 'v1' document of the OpenApi integration + public async Task WriteYamlOpenApiSpec(string fileName, string path = null, string documentKey = "v1") + { + if (path == null) + { + var args = Environment.GetCommandLineArgs(); + var outputKey = args.IndexOf("--output"); + if (outputKey >= 0 && args.Length > outputKey + 1) + { + path = args[outputKey + 1]; + } + else + { + path = Directory.GetCurrentDirectory(); + } + + } + var provider = services.GetRequiredKeyedService(documentKey); + var document = await provider.GetOpenApiDocumentAsync(); + + Directory.CreateDirectory(path); + var filePath = Path.Combine(path, fileName); + using var textWriter = File.CreateText(filePath); + var writer = new OpenApiYamlWriter(textWriter); + + document.SerializeAsV3(writer); + await writer.FlushAsync(); + await textWriter.FlushAsync(); + } + } +} diff --git a/src/Moryx.AspNetCore.OpenApi/RemoveEmptyResponseTypeOperationTransformer.cs b/src/Moryx.AspNetCore.OpenApi/RemoveEmptyResponseTypeOperationTransformer.cs new file mode 100644 index 0000000000..1fa95728e4 --- /dev/null +++ b/src/Moryx.AspNetCore.OpenApi/RemoveEmptyResponseTypeOperationTransformer.cs @@ -0,0 +1,29 @@ +// Copyright (c) 2026 Phoenix Contact GmbH & Co. KG +// Licensed under the Apache License, Version 2.0 + +using Microsoft.AspNetCore.OpenApi; +using Microsoft.OpenApi; + +namespace Moryx.AspNetCore.OpenApi; + +/// +/// Remove content types that don't have a defined response in the schema. +/// Necessary to keep the void results in generated client code. +/// +internal class RemoveEmptyResponseTypeOperationTransformer : IOpenApiOperationTransformer +{ + public async Task TransformAsync(OpenApiOperation operation, OpenApiOperationTransformerContext context, CancellationToken cancellationToken) + { + foreach (var (code, value) in operation.Responses) + { + var emptyTypes = value?.Content? + .Where(pair => + pair.Value.Schema == null).ToArray() + ?? []; + foreach (var empty in emptyTypes) + { + value.Content.Remove(empty.Key); + } + } + } +} diff --git a/src/Moryx.AspNetCore.OpenApi/SetOperationIdOperationTransformer.cs b/src/Moryx.AspNetCore.OpenApi/SetOperationIdOperationTransformer.cs new file mode 100644 index 0000000000..640db0585d --- /dev/null +++ b/src/Moryx.AspNetCore.OpenApi/SetOperationIdOperationTransformer.cs @@ -0,0 +1,19 @@ +// Copyright (c) 2026 Phoenix Contact GmbH & Co. KG +// Licensed under the Apache License, Version 2.0 + +using Microsoft.AspNetCore.Mvc.Controllers; +using Microsoft.AspNetCore.OpenApi; +using Microsoft.OpenApi; + +namespace Moryx.AspNetCore.OpenApi; + +internal class SetOperationIdOperationTransformer : IOpenApiOperationTransformer +{ + public async Task TransformAsync(OpenApiOperation operation, OpenApiOperationTransformerContext context, CancellationToken cancellationToken) + { + if (context.Description.ActionDescriptor is ControllerActionDescriptor controllerActionDescriptor) + { + operation.OperationId = controllerActionDescriptor.MethodInfo.Name; // TODO: This keeps the old behavior, but it's actually violating guidelines regrading uniqueness + } + } +} \ No newline at end of file diff --git a/src/Moryx.AspNetCore.OpenApi/SseOperationTransformer.cs b/src/Moryx.AspNetCore.OpenApi/SseOperationTransformer.cs new file mode 100644 index 0000000000..2a23859c15 --- /dev/null +++ b/src/Moryx.AspNetCore.OpenApi/SseOperationTransformer.cs @@ -0,0 +1,86 @@ +// Copyright (c) 2026 Phoenix Contact GmbH & Co. KG +// Licensed under the Apache License, Version 2.0 + +using System.Diagnostics; +using System.Globalization; +using System.Net; +using System.Text.Json.Serialization.Metadata; +using Microsoft.AspNetCore.Http.Json; +using Microsoft.AspNetCore.OpenApi; +using Microsoft.Extensions.Options; +using Microsoft.OpenApi; +using Moryx.AspNetCore; + +internal class SseOperationTransformer(IOptions openapiOptions) : IOpenApiOperationTransformer +{ + internal const string SseItemBaseSchemaId = "SseItemBase"; + private const string EventStreamResponseType = "text/event-stream"; + public async Task TransformAsync(OpenApiOperation operation, OpenApiOperationTransformerContext context, CancellationToken cancellationToken) + { + var producesAttributes = context.Description.ActionDescriptor.EndpointMetadata.OfType().ToList(); + + if (producesAttributes.Count == 0) + { + return; + } + + var pseudoResponseKeys = operation.Responses.Keys.Where(x => int.TryParse(x, out var v) && v >= 1000).ToList(); + foreach (var pseudoKeys in pseudoResponseKeys) + { + operation.Responses.Remove(pseudoKeys); + } + + var responseKey = ((int)HttpStatusCode.OK).ToString(CultureInfo.InvariantCulture); + if (!operation.Responses.TryGetValue(responseKey, out var response)) + { + response = new OpenApiResponse() + { + Description = HttpStatusCode.OK.GetDisplayName(), + Content = new Dictionary(), + }; + + operation.Responses.Add(responseKey, response); + } + if (!response.Content.TryGetValue(EventStreamResponseType, out var mediaType)) + { + mediaType = new OpenApiMediaType(); + response.Content[EventStreamResponseType] = mediaType; + } + + Dictionary schemas = new(); + foreach (var a in producesAttributes) + { + var dataSchemaId = openapiOptions.Value.CreateSchemaReferenceId(JsonTypeInfo.CreateJsonTypeInfo(a.PayloadType, new JsonOptions().SerializerOptions)); + Debug.Assert(context.Document.Components.Schemas.ContainsKey(dataSchemaId)); + + var schemaId = $"SseItemOf{a.PayloadType.Name}"; + if (!context.Document.Components.Schemas.TryGetValue(schemaId, out var schema)) + { + context.Document.AddComponent(schemaId, new OpenApiSchema() + { + AllOf = [new OpenApiSchemaReference(SseItemBaseSchemaId)], + Properties = new Dictionary() + { + { "data", new OpenApiSchemaReference(dataSchemaId) } + } + }); + } + var description = string.IsNullOrEmpty(a.Description) + ? $"Published with type '{a.EventType}'" + : $"Published with type '{a.EventType}': {a.Description}"; + + schemas.Add(a.EventType, new OpenApiSchemaReference(schemaId) { Description = description }); + } + + mediaType.Schema = new OpenApiSchema() + { + Discriminator = new OpenApiDiscriminator() + { + PropertyName = "type", + Mapping = schemas, + }, + OneOf = schemas.Values.ToList(), + }; + + } +} diff --git a/src/Moryx.AspNetCore/Moryx.AspNetCore.csproj b/src/Moryx.AspNetCore/Moryx.AspNetCore.csproj index dff8919339..cdddf655b7 100644 --- a/src/Moryx.AspNetCore/Moryx.AspNetCore.csproj +++ b/src/Moryx.AspNetCore/Moryx.AspNetCore.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/Moryx.AspNetCore/ProducesSseEventAttribute.cs b/src/Moryx.AspNetCore/ProducesSseEventAttribute.cs new file mode 100644 index 0000000000..d2d6e32707 --- /dev/null +++ b/src/Moryx.AspNetCore/ProducesSseEventAttribute.cs @@ -0,0 +1,47 @@ +// Copyright (c) 2026 Phoenix Contact GmbH & Co. KG +// Licensed under the Apache License, Version 2.0 + +using System.Diagnostics; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.ApiExplorer; + +namespace Moryx.AspNetCore; + +/// +/// Augmentation to AspNetCore build in ProducesAttribute to document sse events. +/// Need to map to the openapi spec explicitly +/// +/// +/// +[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] +public class ProducesSseEventAttribute(string? eventType, Type payloadType) : ProducesResponseTypeAttribute(payloadType, GetPseudoUniqueKey(eventType), "text/event-stream"), IApiResponseMetadataProvider +{ + /// + /// EventType used in the sse message + /// + public string EventType { get; set; } = eventType; + + /// + /// Type of the payload beeing send when this EventType is send + /// + public Type PayloadType => base.Type; + + /// + /// Returns a hash based id for the eventype that is greater than thousand too stop conflicts with legitamate ResponseCodes + /// + private static int GetPseudoUniqueKey(string eventType) + { + var value = (eventType.GetHashCode() % 1_000_000_000) + 1_000_001_000; + Debug.Assert(value > 1000); + return value; + } +} + +/// +/// Helper to use ProducesSseEvent when enums are used as event types +/// +/// Enum type used to discriminate events +public class ProducesSseEventAttribute(T key, Type responseType) : ProducesSseEventAttribute(key.ToString(), responseType) where T : Enum +{ + +} diff --git a/src/Moryx.Orders.Endpoints/Moryx.Orders.Endpoints.csproj b/src/Moryx.Orders.Endpoints/Moryx.Orders.Endpoints.csproj index 56f1336eec..0d3b3f4a65 100644 --- a/src/Moryx.Orders.Endpoints/Moryx.Orders.Endpoints.csproj +++ b/src/Moryx.Orders.Endpoints/Moryx.Orders.Endpoints.csproj @@ -4,6 +4,7 @@ net10.0 Endpoints for the order management true + true diff --git a/src/Moryx.Orders.Endpoints/OrderManagementController.cs b/src/Moryx.Orders.Endpoints/OrderManagementController.cs index aeedc234e3..11e3378b03 100644 --- a/src/Moryx.Orders.Endpoints/OrderManagementController.cs +++ b/src/Moryx.Orders.Endpoints/OrderManagementController.cs @@ -1,19 +1,19 @@ // Copyright (c) 2026 Phoenix Contact GmbH & Co. KG // Licensed under the Apache License, Version 2.0 -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using Moryx.AbstractionLayer.Products; -using Moryx.Orders.Endpoints.Properties; -using Moryx.Users; using System.Net; using System.Net.ServerSentEvents; using System.Text.Json; using System.Text.Json.Serialization; using System.Threading.Channels; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Moryx.AbstractionLayer.Products; using Moryx.AspNetCore; using Moryx.Orders.Endpoints.Models; +using Moryx.Orders.Endpoints.Properties; +using Moryx.Users; namespace Moryx.Orders.Endpoints; @@ -41,21 +41,41 @@ public OrderManagementController(IOrderManagement orderManagement, IUserManageme } #region HttpGet + /// + /// Retrieve all current operations that match the given filter parameters. + /// Already completed or aborted Operations won't be included. + /// + /// Optional. If specified only operations that belong to this order will be returned + /// Optional. If specified only operations with this operation number will be returned [HttpGet] [ProducesResponseType(typeof(OperationModel[]), StatusCodes.Status200OK)] [Authorize(Policy = OrderPermissions.CanView)] public ActionResult GetOperations(string orderNumber = null, string operationNumber = null) { - var operations = _orderManagement.GetOperations(_ => true) - .Where(o => orderNumber is null || o.Order.Number == orderNumber) - .Where(o => operationNumber is null || o.Number == operationNumber) + Func filter = (orderNumber, operationNumber) switch + { + (null, null) => _ => true, + (string order, null) => o => o.Order.Number == order, + (null, string operation) => o => o.Number == operation, + (string order, string operation) => o => o.Number == operation && o.Order.Number == order + }; + var operations = _orderManagement.GetOperations(filter) .Select(Converter.ToModel).ToArray(); return operations; } + /// + /// Stream that allow subscribing to operation changes. + /// [HttpGet("stream")] - [ProducesResponseType(typeof(OperationChangedModel), StatusCodes.Status200OK)] + [ProducesSseEvent(OperationTypes.Start, typeof(OperationStartedModel), Description = "Published when operation has been started")] + [ProducesSseEvent(OperationTypes.Progress, typeof(OperationModel))] + [ProducesSseEvent(OperationTypes.Completed, typeof(OperationReportedModel))] + [ProducesSseEvent(OperationTypes.Interrupted, typeof(OperationReportedModel))] + [ProducesSseEvent(OperationTypes.Report, typeof(OperationReportedModel))] + [ProducesSseEvent(OperationTypes.Advice, typeof(OperationAdvicedModel))] + [ProducesSseEvent(OperationTypes.Update, typeof(OperationModel))] public async Task OperationStream(CancellationToken cancellationToken) { var channel = Channel.CreateUnbounded>(); @@ -142,6 +162,12 @@ void Broadcast(string eventType, object data) } } + /// + /// Retrieves an operationmodel using the unique id of the operation + /// (Can load completed operations from storage) + /// + /// + /// [HttpGet] [ProducesResponseType(typeof(OperationModel), StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] @@ -157,6 +183,11 @@ public async Task> GetOperation(Guid guid) return Converter.ToModel(operation); } + /// + /// Retrieve the documents attached to operation with the given id + /// + /// Id of the operation + /// A list of document models describing the available documents [HttpGet] [ProducesResponseType(typeof(DocumentModel[]), StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] @@ -172,6 +203,12 @@ public async Task> GetDocuments(Guid guid) return operation.Documents.Select(Converter.ToModel).ToArray(); } + /// + /// Retrieves the content of the document specified using the operation id and the identifier of the document + /// + /// Id of the operation + /// Identifier of the document + /// [HttpGet] [ProducesResponseType(StatusCodes.Status400BadRequest)] [ProducesResponseType(typeof(MoryxExceptionResponse), StatusCodes.Status404NotFound)] @@ -188,13 +225,18 @@ public async Task GetDocumentStream(Guid guid, string identifier) var document = operation.Documents.FirstOrDefault(x => x.Identifier == identifier); if (document == null) return NotFound(new MoryxExceptionResponse { Title = Strings.OrderManagementController_GetDocuments_DocumentNotFound }); - + // TODO: Change the return value here. This is not a bad request. It's not the callers fault that the ContentType is not set if (string.IsNullOrEmpty(document.ContentType)) return BadRequest(); return new FileStreamResult(document.GetStream(), document.ContentType); } + /// + /// Retrieve a list of product parts attached to the given operation + /// + /// If of the operation + /// The list of product parts [HttpGet] [ProducesResponseType(typeof(ProductPartModel[]), StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] @@ -210,6 +252,11 @@ public async Task> GetProductParts(Guid guid) return operation.Parts.Select(Converter.ToModel).ToArray(); } + /// + /// Retrieves the begin context for the given operation + /// + /// Id of the operation + /// An object that can be used to popualte a begin dialog to the user [HttpGet] [ProducesResponseType(typeof(BeginContext), StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] @@ -233,6 +280,11 @@ public async Task> GetBeginContext(Guid guid) return beginContext; } + /// + /// Retrieves a report context for the given operation + /// + /// Id of the operation + /// An object that can be used to populate a report dialog for the user [HttpGet] [ProducesResponseType(typeof(ReportContext), StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] @@ -252,6 +304,11 @@ public async Task> GetReportContext(Guid guid) return reportContext; } + /// + /// Retrieves a interrupt context for the given operation + /// + /// Id of the operation + /// An object that can be used to populate a interrupt dialog for the user [HttpGet] [ProducesResponseType(typeof(ReportContext), StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] @@ -270,7 +327,11 @@ public async Task> GetInterruptContext(Guid guid) return reportContext; } - + /// + /// Retrieves a advice context for the given operation + /// + /// Id of the operation + /// An object that can be used to populate a advice dialog for the user [HttpGet] [ProducesResponseType(typeof(AdviceContext), StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] @@ -290,6 +351,11 @@ public async Task> GetAdviceContext(Guid guid) return adviceContext; } + /// + /// Retrieves logs written during the creation of the operation + /// + /// Id of the operation + /// A list of log messages [HttpGet] [Route("{guid}/logs")] [ProducesResponseType(typeof(OperationLogMessageModel[]), StatusCodes.Status200OK)] @@ -304,6 +370,12 @@ public async Task> GetLogs(Guid guid) return _orderManagement.GetLogs(operation).Select(Converter.ToModel).ToArray(); } + /// + /// Get's the list of recipes available to produce the given product + /// + /// Product identifier + /// Product revision + /// [HttpGet] [Route("recipes")] [ProducesResponseType(typeof(OperationRecipeModel[]), StatusCodes.Status200OK)] @@ -317,6 +389,12 @@ public async Task> GetAssignableRecipes(str #endregion #region HttpPost + /// + /// Add an operation to the order stock + /// + /// Description of the operation + /// Identifier of the application adding the operation + /// [HttpPost] [ProducesResponseType(typeof(OperationModel), StatusCodes.Status200OK)] [ProducesResponseType(typeof(string), StatusCodes.Status400BadRequest)] @@ -340,6 +418,11 @@ public async Task> AddOperation(OperationCreationCo } } + /// + /// Begin producing the operation using the given parameters + /// + /// Id of the operation + /// Begin parameters [HttpPost] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] @@ -364,6 +447,10 @@ public async Task BeginOperation(Guid guid, BeginModel beginModel) return Ok(); } + /// + /// Abort the specified operation (Remove it before being started) + /// + /// Id of the operation [HttpPost] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] @@ -380,6 +467,11 @@ public async Task AbortOperation(Guid guid) return Ok(); } + /// + /// Report produced amounts of a given operation + /// + /// Id of the operation + /// Parameter object [HttpPost] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] @@ -398,6 +490,11 @@ public async Task ReportOperation(Guid guid, ReportModel report) return Ok(); } + /// + /// Interrupt the given operation + /// + /// Id of the operation + /// Identifier of the user requesting the interrupt (Optional depending on configuration) [HttpPost] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] @@ -418,6 +515,11 @@ public async Task InterruptOperation(Guid guid, string userIdentif return Ok(); } + /// + /// Advice operation + /// + /// Id of the operation + /// Parameter object [HttpPost] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(typeof(string), StatusCodes.Status400BadRequest)] @@ -440,6 +542,11 @@ public async Task AdviceOperation(Guid guid, AdviceModel advice) #region HttpPut + /// + /// Update the operation + /// + /// Id of the operation + /// Paramter object [HttpPut] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] @@ -456,6 +563,10 @@ public async Task UpdateOperation(Guid guid, OperationUpdateModel return Ok(); } + /// + /// Reload the operation, rerunning the order assignment steps + /// + /// Id of the operation [HttpPut] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] diff --git a/src/Moryx.Orders.Web/app/openapi-gen.json b/src/Moryx.Orders.Web/app/openapi-gen.json index 5d4128ac8b..1953e67dc0 100644 --- a/src/Moryx.Orders.Web/app/openapi-gen.json +++ b/src/Moryx.Orders.Web/app/openapi-gen.json @@ -1,6 +1,6 @@ { "$schema": "node_modules/ng-openapi-gen/ng-openapi-gen-schema.json", - "input": "https://localhost:5000/swagger/v1/swagger.json", + "input": "../../../schemas/framework-api.json", "output": "src/app/api", "ignoreUnusedModels": true, "includeTags": [ diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/operator-management/add.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/operator-management/add.ts index e58d40c141..54abeaaa48 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/operator-management/add.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/operator-management/add.ts @@ -15,10 +15,10 @@ import { RequestBuilder } from '../../request-builder'; import { OperatorModel } from '../../models/operator-model'; export interface Add$Params { - body?: OperatorModel + body: OperatorModel } -export function add(http: HttpClient, rootUrl: string, params?: Add$Params, context?: HttpContext): Observable> { +export function add(http: HttpClient, rootUrl: string, params: Add$Params, context?: HttpContext): Observable> { const rb = new RequestBuilder(rootUrl, add.PATH, 'post'); if (params) { rb.body(params.body, 'application/*+json'); diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/operator-management/update.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/operator-management/update.ts index a29a84d5df..25eba66887 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/operator-management/update.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/operator-management/update.ts @@ -16,7 +16,7 @@ import { OperatorModel } from '../../models/operator-model'; export interface Update$Params { identifier: string; - body?: OperatorModel + body: OperatorModel } export function update(http: HttpClient, rootUrl: string, params: Update$Params, context?: HttpContext): Observable> { diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/abort-operation.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/abort-operation.ts index 53c4b97c17..0cda69b6ac 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/abort-operation.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/abort-operation.ts @@ -14,6 +14,10 @@ import { RequestBuilder } from '../../request-builder'; export interface AbortOperation$Params { + +/** + * Id of the operation + */ guid: string; } diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/add-operation.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/add-operation.ts index 7015193cec..380bf1cde4 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/add-operation.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/add-operation.ts @@ -16,11 +16,19 @@ import { OperationCreationContextModel } from '../../models/operation-creation-c import { OperationModel } from '../../models/operation-model'; export interface AddOperation$Params { + +/** + * Identifier of the application adding the operation + */ sourceId?: string; - body?: OperationCreationContextModel + + /** + * Description of the operation + */ + body: OperationCreationContextModel } -export function addOperation(http: HttpClient, rootUrl: string, params?: AddOperation$Params, context?: HttpContext): Observable> { +export function addOperation(http: HttpClient, rootUrl: string, params: AddOperation$Params, context?: HttpContext): Observable> { const rb = new RequestBuilder(rootUrl, addOperation.PATH, 'post'); if (params) { rb.query('sourceId', params.sourceId, {}); diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/advice-operation.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/advice-operation.ts index 383a8ab74e..0b0e435aee 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/advice-operation.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/advice-operation.ts @@ -15,8 +15,16 @@ import { RequestBuilder } from '../../request-builder'; import { AdviceModel } from '../../models/advice-model'; export interface AdviceOperation$Params { + +/** + * Id of the operation + */ guid: string; - body?: AdviceModel + + /** + * Parameter object + */ + body: AdviceModel } export function adviceOperation(http: HttpClient, rootUrl: string, params: AdviceOperation$Params, context?: HttpContext): Observable> { diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/begin-operation.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/begin-operation.ts index 53c1b89996..704242ebd1 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/begin-operation.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/begin-operation.ts @@ -15,8 +15,16 @@ import { RequestBuilder } from '../../request-builder'; import { BeginModel } from '../../models/begin-model'; export interface BeginOperation$Params { + +/** + * Id of the operation + */ guid: string; - body?: BeginModel + + /** + * Begin parameters + */ + body: BeginModel } export function beginOperation(http: HttpClient, rootUrl: string, params: BeginOperation$Params, context?: HttpContext): Observable> { diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-advice-context.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-advice-context.ts index c7b2859fee..758fd85b5d 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-advice-context.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-advice-context.ts @@ -15,6 +15,10 @@ import { RequestBuilder } from '../../request-builder'; import { AdviceContext } from '../../models/advice-context'; export interface GetAdviceContext$Params { + +/** + * Id of the operation + */ guid: string; } diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-assignable-recipes.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-assignable-recipes.ts index a462b173ca..913f35f1bb 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-assignable-recipes.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-assignable-recipes.ts @@ -15,7 +15,15 @@ import { RequestBuilder } from '../../request-builder'; import { OperationRecipeModel } from '../../models/operation-recipe-model'; export interface GetAssignableRecipes$Params { + +/** + * Product identifier + */ identifier?: string; + +/** + * Product revision + */ revision?: number; } diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-begin-context.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-begin-context.ts index b444031054..5405674839 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-begin-context.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-begin-context.ts @@ -15,6 +15,10 @@ import { RequestBuilder } from '../../request-builder'; import { BeginContext } from '../../models/begin-context'; export interface GetBeginContext$Params { + +/** + * Id of the operation + */ guid: string; } diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-document-stream.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-document-stream.ts index de4eab5fe0..76f66a865f 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-document-stream.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-document-stream.ts @@ -12,13 +12,22 @@ import { filter, map } from 'rxjs/operators'; import { StrictHttpResponse } from '../../strict-http-response'; import { RequestBuilder } from '../../request-builder'; +import { FileStreamResult } from '../../models/file-stream-result'; export interface GetDocumentStream$Params { + +/** + * Id of the operation + */ guid: string; + +/** + * Identifier of the document + */ identifier: string; } -export function getDocumentStream(http: HttpClient, rootUrl: string, params: GetDocumentStream$Params, context?: HttpContext): Observable> { +export function getDocumentStream(http: HttpClient, rootUrl: string, params: GetDocumentStream$Params, context?: HttpContext): Observable> { const rb = new RequestBuilder(rootUrl, getDocumentStream.PATH, 'get'); if (params) { rb.path('guid', params.guid, {}); @@ -30,7 +39,7 @@ export function getDocumentStream(http: HttpClient, rootUrl: string, params: Get ).pipe( filter((r: any): r is HttpResponse => r instanceof HttpResponse), map((r: HttpResponse) => { - return r as StrictHttpResponse; + return r as StrictHttpResponse; }) ); } diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-documents.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-documents.ts index a3c6f38326..a63077785c 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-documents.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-documents.ts @@ -15,6 +15,10 @@ import { RequestBuilder } from '../../request-builder'; import { DocumentModel } from '../../models/document-model'; export interface GetDocuments$Params { + +/** + * Id of the operation + */ guid: string; } diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-interrupt-context.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-interrupt-context.ts index ff75ca0efd..d38b21af17 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-interrupt-context.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-interrupt-context.ts @@ -15,6 +15,10 @@ import { RequestBuilder } from '../../request-builder'; import { ReportContext } from '../../models/report-context'; export interface GetInterruptContext$Params { + +/** + * Id of the operation + */ guid: string; } diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-logs.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-logs.ts index f9bb8b8055..d57683544f 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-logs.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-logs.ts @@ -15,6 +15,10 @@ import { RequestBuilder } from '../../request-builder'; import { OperationLogMessageModel } from '../../models/operation-log-message-model'; export interface GetLogs$Params { + +/** + * Id of the operation + */ guid: string; } diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-operations.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-operations.ts index f955a41e95..4b5c463065 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-operations.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-operations.ts @@ -15,7 +15,15 @@ import { RequestBuilder } from '../../request-builder'; import { OperationModel } from '../../models/operation-model'; export interface GetOperations$Params { + +/** + * Optional. If specified only operations that belong to this order will be returned + */ orderNumber?: string; + +/** + * Optional. If specified only operations with this operation number will be returned + */ operationNumber?: string; } diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-product-parts.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-product-parts.ts index d808f4a298..9bd2bb23d8 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-product-parts.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-product-parts.ts @@ -15,6 +15,10 @@ import { RequestBuilder } from '../../request-builder'; import { ProductPartModel } from '../../models/product-part-model'; export interface GetProductParts$Params { + +/** + * If of the operation + */ guid: string; } diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-report-context.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-report-context.ts index b2e60efa65..4e1544a678 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-report-context.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/get-report-context.ts @@ -15,6 +15,10 @@ import { RequestBuilder } from '../../request-builder'; import { ReportContext } from '../../models/report-context'; export interface GetReportContext$Params { + +/** + * Id of the operation + */ guid: string; } diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/interrupt-operation.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/interrupt-operation.ts index cd245d572a..1f7c0f3af4 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/interrupt-operation.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/interrupt-operation.ts @@ -14,7 +14,15 @@ import { RequestBuilder } from '../../request-builder'; export interface InterruptOperation$Params { + +/** + * Id of the operation + */ guid: string; + +/** + * Identifier of the user requesting the interrupt (Optional depending on configuration) + */ userIdentifier?: string; } diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/operation-stream.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/operation-stream.ts index 075476dfc6..511d88920c 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/operation-stream.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/operation-stream.ts @@ -12,22 +12,25 @@ import { filter, map } from 'rxjs/operators'; import { StrictHttpResponse } from '../../strict-http-response'; import { RequestBuilder } from '../../request-builder'; -import { OperationChangedModel } from '../../models/operation-changed-model'; +import { SseItemOfOperationAdvicedModel } from '../../models/sse-item-of-operation-adviced-model'; +import { SseItemOfOperationModel } from '../../models/sse-item-of-operation-model'; +import { SseItemOfOperationReportedModel } from '../../models/sse-item-of-operation-reported-model'; +import { SseItemOfOperationStartedModel } from '../../models/sse-item-of-operation-started-model'; export interface OperationStream$Params { } -export function operationStream(http: HttpClient, rootUrl: string, params?: OperationStream$Params, context?: HttpContext): Observable> { +export function operationStream(http: HttpClient, rootUrl: string, params?: OperationStream$Params, context?: HttpContext): Observable> { const rb = new RequestBuilder(rootUrl, operationStream.PATH, 'get'); if (params) { } return http.request( - rb.build({ responseType: 'json', accept: 'application/json', context }) + rb.build({ responseType: 'text', accept: 'text/event-stream', context }) ).pipe( filter((r: any): r is HttpResponse => r instanceof HttpResponse), map((r: HttpResponse) => { - return r as StrictHttpResponse; + return r as StrictHttpResponse<(SseItemOfOperationStartedModel | SseItemOfOperationModel | SseItemOfOperationReportedModel | SseItemOfOperationReportedModel | SseItemOfOperationReportedModel | SseItemOfOperationAdvicedModel | SseItemOfOperationModel)>; }) ); } diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/reload.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/reload.ts index 5846883b37..d520305641 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/reload.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/reload.ts @@ -14,6 +14,10 @@ import { RequestBuilder } from '../../request-builder'; export interface Reload$Params { + +/** + * Id of the operation + */ guid: string; } diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/report-operation.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/report-operation.ts index 24c756e152..9e45f364ad 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/report-operation.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/report-operation.ts @@ -15,8 +15,16 @@ import { RequestBuilder } from '../../request-builder'; import { ReportModel } from '../../models/report-model'; export interface ReportOperation$Params { + +/** + * Id of the operation + */ guid: string; - body?: ReportModel + + /** + * Parameter object + */ + body: ReportModel } export function reportOperation(http: HttpClient, rootUrl: string, params: ReportOperation$Params, context?: HttpContext): Observable> { diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/update-operation.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/update-operation.ts index ab175012d5..a286e727e6 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/update-operation.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/order-management/update-operation.ts @@ -15,8 +15,16 @@ import { RequestBuilder } from '../../request-builder'; import { OperationUpdateModel } from '../../models/operation-update-model'; export interface UpdateOperation$Params { + +/** + * Id of the operation + */ guid: string; - body?: OperationUpdateModel + + /** + * Paramter object + */ + body: OperationUpdateModel } export function updateOperation(http: HttpClient, rootUrl: string, params: UpdateOperation$Params, context?: HttpContext): Observable> { diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/create-instance.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/create-instance.ts index 5fc22ebcbd..fd659d506e 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/create-instance.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/create-instance.ts @@ -15,8 +15,20 @@ import { RequestBuilder } from '../../request-builder'; import { ProductInstanceModel } from '../../models/product-instance-model'; export interface CreateInstance$Params { + +/** + * Product identifier + */ identifier?: string; + +/** + * Revision of the product + */ revision?: number; + +/** + * If save is false, the new instance won't be stored in the db + */ save?: boolean; } diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/duplicate.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/duplicate.ts index 03d16d4556..6054381be6 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/duplicate.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/duplicate.ts @@ -15,8 +15,16 @@ import { RequestBuilder } from '../../request-builder'; import { ProductModel } from '../../models/product-model'; export interface Duplicate$Params { + +/** + * Database id of the existing product type + */ id: number; - body?: string + + /** + * Product identifier of the new product + */ + body: string } export function duplicate(http: HttpClient, rootUrl: string, params: Duplicate$Params, context?: HttpContext): Observable> { diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/get-instance.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/get-instance.ts index a43f8580c9..9393db2250 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/get-instance.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/get-instance.ts @@ -15,6 +15,10 @@ import { RequestBuilder } from '../../request-builder'; import { ProductInstanceModel } from '../../models/product-instance-model'; export interface GetInstance$Params { + +/** + * Database id of the product instance + */ id: number; } diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/get-instances.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/get-instances.ts index 2e92ff0010..a65f03787c 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/get-instances.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/get-instances.ts @@ -15,6 +15,10 @@ import { RequestBuilder } from '../../request-builder'; import { ProductInstanceModel } from '../../models/product-instance-model'; export interface GetInstances$Params { + +/** + * A list of product instance ids + */ ids?: Array; } diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/get-recipe.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/get-recipe.ts index 1b548dc3d7..93fc3c3f7f 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/get-recipe.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/get-recipe.ts @@ -15,6 +15,10 @@ import { RequestBuilder } from '../../request-builder'; import { RecipeModel } from '../../models/recipe-model'; export interface GetRecipe$Params { + +/** + * Database id of the recipe + */ id: number; } diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/get-recipes.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/get-recipes.ts index 39ff33b1ee..997365ede2 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/get-recipes.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/get-recipes.ts @@ -15,7 +15,15 @@ import { RequestBuilder } from '../../request-builder'; import { RecipeModel } from '../../models/recipe-model'; export interface GetRecipes$Params { + +/** + * Database id + */ id: number; + +/** + * Recipe classification RecipeClassification + */ classification: number; } diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/get-type-by-id.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/get-type-by-id.ts index 81acac5b91..bc0d25efef 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/get-type-by-id.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/get-type-by-id.ts @@ -15,6 +15,10 @@ import { RequestBuilder } from '../../request-builder'; import { ProductModel } from '../../models/product-model'; export interface GetTypeById$Params { + +/** + * Database id + */ id: number; } diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/get-type-by-identity.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/get-type-by-identity.ts index c5cf4c06bf..b6899969cc 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/get-type-by-identity.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/get-type-by-identity.ts @@ -15,6 +15,10 @@ import { RequestBuilder } from '../../request-builder'; import { ProductModel } from '../../models/product-model'; export interface GetTypeByIdentity$Params { + +/** + * Optional. The id to look for + */ identity?: string; } diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/get-types.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/get-types.ts index 0ad1b0ba0e..4768f33018 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/get-types.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/get-types.ts @@ -16,10 +16,14 @@ import { ProductModel } from '../../models/product-model'; import { ProductQuery } from '../../models/product-query'; export interface GetTypes$Params { - body?: ProductQuery + + /** + * Query parameters + */ + body: ProductQuery } -export function getTypes(http: HttpClient, rootUrl: string, params?: GetTypes$Params, context?: HttpContext): Observable>> { +export function getTypes(http: HttpClient, rootUrl: string, params: GetTypes$Params, context?: HttpContext): Observable>> { const rb = new RequestBuilder(rootUrl, getTypes.PATH, 'post'); if (params) { rb.body(params.body, 'application/*+json'); diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/import.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/import.ts index 1179571565..c07aff507f 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/import.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/import.ts @@ -17,8 +17,16 @@ import { RequestBuilder } from '../../request-builder'; import { ProductModel } from '../../models/product-model'; export interface Import$Params { + +/** + * Name of the importer + */ importerName: string; - body?: Entry + + /** + * Parameters for the importer + */ + body: Entry } export function import$(http: HttpClient, rootUrl: string, params: Import$Params, context?: HttpContext): Observable>> { diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/save-instance.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/save-instance.ts index 6bfe1c0611..7e96f6f266 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/save-instance.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/save-instance.ts @@ -15,10 +15,14 @@ import { RequestBuilder } from '../../request-builder'; import { ProductInstanceModel } from '../../models/product-instance-model'; export interface SaveInstance$Params { - body?: ProductInstanceModel + + /** + * Model of the product instance + */ + body: ProductInstanceModel } -export function saveInstance(http: HttpClient, rootUrl: string, params?: SaveInstance$Params, context?: HttpContext): Observable> { +export function saveInstance(http: HttpClient, rootUrl: string, params: SaveInstance$Params, context?: HttpContext): Observable> { const rb = new RequestBuilder(rootUrl, saveInstance.PATH, 'put'); if (params) { rb.body(params.body, 'application/*+json'); diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/save-recipe.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/save-recipe.ts index 29c0508df6..673574140a 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/save-recipe.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/save-recipe.ts @@ -15,10 +15,14 @@ import { RequestBuilder } from '../../request-builder'; import { RecipeModel } from '../../models/recipe-model'; export interface SaveRecipe$Params { - body?: RecipeModel + + /** + * Model of the recipe + */ + body: RecipeModel } -export function saveRecipe(http: HttpClient, rootUrl: string, params?: SaveRecipe$Params, context?: HttpContext): Observable> { +export function saveRecipe(http: HttpClient, rootUrl: string, params: SaveRecipe$Params, context?: HttpContext): Observable> { const rb = new RequestBuilder(rootUrl, saveRecipe.PATH, 'post'); if (params) { rb.body(params.body, 'application/*+json'); diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/save-type.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/save-type.ts index 23a5ae9acf..ece68ebd2b 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/save-type.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/save-type.ts @@ -15,10 +15,14 @@ import { RequestBuilder } from '../../request-builder'; import { ProductModel } from '../../models/product-model'; export interface SaveType$Params { - body?: ProductModel + + /** + * Model of the new product + */ + body: ProductModel } -export function saveType(http: HttpClient, rootUrl: string, params?: SaveType$Params, context?: HttpContext): Observable> { +export function saveType(http: HttpClient, rootUrl: string, params: SaveType$Params, context?: HttpContext): Observable> { const rb = new RequestBuilder(rootUrl, saveType.PATH, 'post'); if (params) { rb.body(params.body, 'application/*+json'); diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/update-recipe.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/update-recipe.ts index 0bcf4a4f03..d7d74f15b4 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/update-recipe.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/update-recipe.ts @@ -15,8 +15,16 @@ import { RequestBuilder } from '../../request-builder'; import { RecipeModel } from '../../models/recipe-model'; export interface UpdateRecipe$Params { + +/** + * Database id of the recipe + */ id: number; - body?: RecipeModel + + /** + * Updated recipe model + */ + body: RecipeModel } export function updateRecipe(http: HttpClient, rootUrl: string, params: UpdateRecipe$Params, context?: HttpContext): Observable> { diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/update-type.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/update-type.ts index 49ecadf3c3..07f453da20 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/update-type.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/product-management/update-type.ts @@ -15,8 +15,16 @@ import { RequestBuilder } from '../../request-builder'; import { ProductModel } from '../../models/product-model'; export interface UpdateType$Params { + +/** + * Database id of the product type + */ id: number; - body?: ProductModel + + /** + * New product model + */ + body: ProductModel } export function updateType(http: HttpClient, rootUrl: string, params: UpdateType$Params, context?: HttpContext): Observable> { diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/workplan/save-workplan.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/workplan/save-workplan.ts index a64b48bfa8..63c4ae7182 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/workplan/save-workplan.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/workplan/save-workplan.ts @@ -15,10 +15,10 @@ import { RequestBuilder } from '../../request-builder'; import { WorkplanModel } from '../../models/workplan-model'; export interface SaveWorkplan$Params { - body?: WorkplanModel + body: WorkplanModel } -export function saveWorkplan(http: HttpClient, rootUrl: string, params?: SaveWorkplan$Params, context?: HttpContext): Observable> { +export function saveWorkplan(http: HttpClient, rootUrl: string, params: SaveWorkplan$Params, context?: HttpContext): Observable> { const rb = new RequestBuilder(rootUrl, saveWorkplan.PATH, 'post'); if (params) { rb.body(params.body, 'application/*+json'); diff --git a/src/Moryx.Orders.Web/app/src/app/api/fn/workplan/update-workplan.ts b/src/Moryx.Orders.Web/app/src/app/api/fn/workplan/update-workplan.ts index 8ab8498aa2..1ef5eea031 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/fn/workplan/update-workplan.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/fn/workplan/update-workplan.ts @@ -16,7 +16,7 @@ import { WorkplanModel } from '../../models/workplan-model'; export interface UpdateWorkplan$Params { id: string; - body?: WorkplanModel + body: WorkplanModel } export function updateWorkplan(http: HttpClient, rootUrl: string, params: UpdateWorkplan$Params, context?: HttpContext): Observable> { diff --git a/src/Moryx.Orders.Web/app/src/app/api/models.ts b/src/Moryx.Orders.Web/app/src/app/api/models.ts index 022b14bd13..42f154f416 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/models.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/models.ts @@ -15,12 +15,12 @@ export type { BeginModel } from './models/begin-model'; export { ConfirmationType } from './models/confirmation-type'; export type { DocumentModel } from './models/document-model'; export type { ExtendedOperatorModel } from './models/extended-operator-model'; +export type { FileStreamResult } from './models/file-stream-result'; export type { ICapabilities } from './models/i-capabilities'; export type { IOperatorAssignable } from './models/i-operator-assignable'; export { LogLevel } from './models/log-level'; export type { MoryxExceptionResponse } from './models/moryx-exception-response'; export type { OperationAdvicedModel } from './models/operation-adviced-model'; -export type { OperationChangedModel } from './models/operation-changed-model'; export type { OperationCreationContextModel } from './models/operation-creation-context-model'; export type { OperationLogMessageModel } from './models/operation-log-message-model'; export type { OperationModel } from './models/operation-model'; @@ -57,6 +57,11 @@ export type { RestrictionDescription } from './models/restriction-description'; export { RestrictionSeverity } from './models/restriction-severity'; export { RevisionFilter } from './models/revision-filter'; export { Selector } from './models/selector'; +export type { SseItemBase } from './models/sse-item-base'; +export type { SseItemOfOperationAdvicedModel } from './models/sse-item-of-operation-adviced-model'; +export type { SseItemOfOperationModel } from './models/sse-item-of-operation-model'; +export type { SseItemOfOperationReportedModel } from './models/sse-item-of-operation-reported-model'; +export type { SseItemOfOperationStartedModel } from './models/sse-item-of-operation-started-model'; export { StagingIndicator } from './models/staging-indicator'; export type { WorkplanModel } from './models/workplan-model'; export { WorkplanState } from './models/workplan-state'; diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/advice-context.ts b/src/Moryx.Orders.Web/app/src/app/api/models/advice-context.ts index 440600fc1c..b73e163fea 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/models/advice-context.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/models/advice-context.ts @@ -6,6 +6,14 @@ /* eslint-disable */ /* Code generated by ng-openapi-gen DO NOT EDIT. */ + +/** + * Context for a new advice with all necessary information + */ export interface AdviceContext { + + /** + * Amount which are already adviced + */ advicedAmount?: number; } diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/assignable-operator.ts b/src/Moryx.Orders.Web/app/src/app/api/models/assignable-operator.ts index e1aed15ff5..a2400ac47c 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/models/assignable-operator.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/models/assignable-operator.ts @@ -8,9 +8,9 @@ import { IOperatorAssignable } from '../models/i-operator-assignable'; export interface AssignableOperator { - assignedResources?: Array | null; + assignedResources?: Array; firstName?: string | null; - identifier?: string | null; + identifier: string; lastName?: string | null; pseudonym?: string | null; signedIn?: boolean; diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/begin-context.ts b/src/Moryx.Orders.Web/app/src/app/api/models/begin-context.ts index 3929dd2e88..fc96466de9 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/models/begin-context.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/models/begin-context.ts @@ -7,13 +7,49 @@ /* Code generated by ng-openapi-gen DO NOT EDIT. */ import { RestrictionDescription } from '../models/restriction-description'; + +/** + * Context information to begin an operation production + */ export interface BeginContext { + + /** + * Indicator if a begin is possible + */ canBegin?: boolean; + + /** + * Indicator if an adjustment of the operation is possible + */ canReduce?: boolean; + + /** + * Provides the minimum value that can be set for the target amount when adjusting the operation. + */ minimalTargetAmount?: number; + + /** + * Current target amount of the operation + */ partialAmount?: number; + + /** + * Residual amount of the operation + */ residualAmount?: number; + + /** + * Reasons why a begin is not possible + */ restrictions?: Array | null; + + /** + * Current failure count of the operation + */ scrapCount?: number; + + /** + * Current success count of the operation + */ successCount?: number; } diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/confirmation-type.ts b/src/Moryx.Orders.Web/app/src/app/api/models/confirmation-type.ts index 4361c1026f..c40d4490d9 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/models/confirmation-type.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/models/confirmation-type.ts @@ -6,6 +6,10 @@ /* eslint-disable */ /* Code generated by ng-openapi-gen DO NOT EDIT. */ + +/** + * Confirmation type while reporting amounts of an operation + */ export enum ConfirmationType { Partial = 'Partial', Final = 'Final' diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/file-stream-result.ts b/src/Moryx.Orders.Web/app/src/app/api/models/file-stream-result.ts new file mode 100644 index 0000000000..851b37954d --- /dev/null +++ b/src/Moryx.Orders.Web/app/src/app/api/models/file-stream-result.ts @@ -0,0 +1,10 @@ +/* + * Copyright (c) 2026 Phoenix Contact GmbH & Co. KG + * Licensed under the Apache License, Version 2.0 +*/ + +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +export type FileStreamResult = Blob; + diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/i-capabilities.ts b/src/Moryx.Orders.Web/app/src/app/api/models/i-capabilities.ts index c53081c774..b9d5eb1508 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/models/i-capabilities.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/models/i-capabilities.ts @@ -6,6 +6,14 @@ /* eslint-disable */ /* Code generated by ng-openapi-gen DO NOT EDIT. */ + +/** + * Common capabilities interface + */ export interface ICapabilities { + + /** + * Flag if the capabilities of this instance are implemented by sub instances + */ isCombined?: boolean; } diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/i-operator-assignable.ts b/src/Moryx.Orders.Web/app/src/app/api/models/i-operator-assignable.ts index c109276a51..96f49dbec1 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/models/i-operator-assignable.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/models/i-operator-assignable.ts @@ -9,7 +9,15 @@ import { ICapabilities } from '../models/i-capabilities'; export interface IOperatorAssignable { capabilities?: ICapabilities; + + /** + * Id of the resource + */ id?: number; + + /** + * Name of this resource instance + */ name?: string | null; requiredSkills?: ICapabilities; } diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/operation-changed-model.ts b/src/Moryx.Orders.Web/app/src/app/api/models/operation-changed-model.ts deleted file mode 100644 index 993ff8e488..0000000000 --- a/src/Moryx.Orders.Web/app/src/app/api/models/operation-changed-model.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (c) 2026 Phoenix Contact GmbH & Co. KG - * Licensed under the Apache License, Version 2.0 -*/ - -/* eslint-disable */ -/* Code generated by ng-openapi-gen DO NOT EDIT. */ - -import { OperationAdvicedModel } from '../models/operation-adviced-model'; -import { OperationReportedModel } from '../models/operation-reported-model'; -import { OperationStartedModel } from '../models/operation-started-model'; -export interface OperationChangedModel { - advicedModel?: OperationAdvicedModel; - reportedModel?: OperationReportedModel; - startedModel?: OperationStartedModel; -} diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/operation-creation-context-model.ts b/src/Moryx.Orders.Web/app/src/app/api/models/operation-creation-context-model.ts index 4c3180de1f..ccc5ccb498 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/models/operation-creation-context-model.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/models/operation-creation-context-model.ts @@ -10,21 +10,89 @@ import { Entry } from '@moryx/ngx-web-framework/entry-editor'; import { PartCreationContext } from '../models/part-creation-context'; export interface OperationCreationContextModel { + + /** + * Additional operation depending parameters for the production + */ materialParameters?: Array | null; + + /** + * Operation name + */ name?: string | null; + + /** + * The number of this operation + */ operationNumber?: string | null; + + /** + * The number of the order this operation belongs to + */ orderNumber?: string | null; + + /** + * Total amount planned for over delivery + */ overDeliveryAmount?: number; + + /** + * Part list of the product of this operation + */ parts?: Array | null; + + /** + * Expected end time + */ plannedEnd?: string; + + /** + * Expected start time + */ plannedStart?: string; + + /** + * Main product identifier + */ productIdentifier?: string | null; + + /** + * Name of the Product + */ productName?: string | null; + + /** + * Revision of the Product + */ productRevision?: number; + + /** + * Id of the preselected recipe + */ recipePreselection?: number; + + /** + * Target cycle time for the production of the depending product + */ targetCycleTime?: number; + + /** + * Target stock for produced parts + */ targetStock?: string | null; + + /** + * The amount to produce + */ totalAmount?: number; + + /** + * Total amount planned for under delivery + */ underDeliveryAmount?: number; + + /** + * Unit of product + */ unit?: string | null; } diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/operation-model.ts b/src/Moryx.Orders.Web/app/src/app/api/models/operation-model.ts index 276f5b0b07..3a6e10b95c 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/models/operation-model.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/models/operation-model.ts @@ -9,6 +9,10 @@ import { Entry } from '@moryx/ngx-web-framework/entry-editor'; /* Code generated by ng-openapi-gen DO NOT EDIT. */ import { OperationStateClassification } from '../models/operation-state-classification'; + +/** + * OrderOperation-DTO to be used with the endpoints + */ export interface OperationModel { canAdvice?: boolean; canAssign?: boolean; diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/operation-state-classification.ts b/src/Moryx.Orders.Web/app/src/app/api/models/operation-state-classification.ts index d2cd09068a..df9efc866a 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/models/operation-state-classification.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/models/operation-state-classification.ts @@ -6,6 +6,14 @@ /* eslint-disable */ /* Code generated by ng-openapi-gen DO NOT EDIT. */ + +/** + * Enum providing the classification of the internal state machine of the operation for an external representation + * The lowest 8 bits define the state of the operation. The following 16 bits contain flags for the executable + * actions on the operation and the trailing 8 bits overall classification information. + * Bit: 31 - 24 | 23 - 8 | 7 - 0 | + * Flag: Overall | Usage | State | + */ export enum OperationStateClassification { Initial = 'Initial', Assigning = 'Assigning', diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/part-creation-context.ts b/src/Moryx.Orders.Web/app/src/app/api/models/part-creation-context.ts index c53e25b8cb..3e778e43d9 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/models/part-creation-context.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/models/part-creation-context.ts @@ -8,11 +8,31 @@ import { PartClassification } from '../models/part-classification'; import { StagingIndicator } from '../models/staging-indicator'; + +/** + * Information about a part of the product which should be produced for an operation + */ export interface PartCreationContext { classification?: PartClassification; + + /** + * Name of the part like the product name + */ name?: string | null; + + /** + * Identifier of this part + */ number?: string | null; + + /** + * Quantity of this part which are necessary to produce one product + */ quantity?: number; stagingIndicator?: StagingIndicator; + + /** + * Unit of the quantity + */ unit?: string | null; } diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/problem-details.ts b/src/Moryx.Orders.Web/app/src/app/api/models/problem-details.ts index a683af8312..e172b96854 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/models/problem-details.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/models/problem-details.ts @@ -12,6 +12,4 @@ export interface ProblemDetails { status?: number | null; title?: string | null; type?: string | null; - - [key: string]: any | number | null | string | null | undefined; } diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/product-instance-model.ts b/src/Moryx.Orders.Web/app/src/app/api/models/product-instance-model.ts index d4e86da467..0a85c9b569 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/models/product-instance-model.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/models/product-instance-model.ts @@ -13,5 +13,9 @@ export interface ProductInstanceModel { id?: number; properties?: Entry; state?: ProductInstanceState; + + /** + * The name of the product type of this instance + */ type?: string | null; } diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/product-instance-state.ts b/src/Moryx.Orders.Web/app/src/app/api/models/product-instance-state.ts index 1b30c9cee5..37566620a3 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/models/product-instance-state.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/models/product-instance-state.ts @@ -6,6 +6,11 @@ /* eslint-disable */ /* Code generated by ng-openapi-gen DO NOT EDIT. */ + +/** + * The state of an ProductInstance. + * This will not occupy more than 4 Bits. Other enums can be added by bit-shifting + */ export enum ProductInstanceState { Unset = 'Unset', InProduction = 'InProduction', diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/product-query.ts b/src/Moryx.Orders.Web/app/src/app/api/models/product-query.ts index f5b73d5829..43e7cfb33d 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/models/product-query.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/models/product-query.ts @@ -11,17 +11,55 @@ import { PropertyFilter } from '../models/property-filter'; import { RecipeFilter } from '../models/recipe-filter'; import { RevisionFilter } from '../models/revision-filter'; import { Selector } from '../models/selector'; + +/** + * Filter to fetch products from the product management + */ export interface ProductQuery { + + /** + * When filtering by type exclude derived types and only return specific matches + */ excludeDerivedTypes?: boolean; + + /** + * Material identifiers + */ identifier?: string | null; + + /** + * Flag if deleted products should be included in the query + */ includeDeleted?: boolean; + + /** + * If set to true, product queries return fully populated product types. + * Otherwise only the basic type information is returned. + */ loadFullTypeInformation?: boolean; + + /** + * Material identifiers + */ name?: string | null; + + /** + * List of property filters + */ propertyFilters?: Array | null; recipeFilter?: RecipeFilter; - requiredState?: ProductState; + requiredState?: ('null' | ProductState); + + /** + * Optional specific revision if RevisionFilter ProductQuery.RevisionFilter is set to + * RevisionFilter.Specific + */ revision?: number; revisionFilter?: RevisionFilter; selector?: Selector; + + /** + * Product types to filter by + */ typeName?: string | null; } diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/product-state.ts b/src/Moryx.Orders.Web/app/src/app/api/models/product-state.ts index 9a5ffdcd86..753fbc3bc4 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/models/product-state.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/models/product-state.ts @@ -6,6 +6,10 @@ /* eslint-disable */ /* Code generated by ng-openapi-gen DO NOT EDIT. */ + +/** + * Current state of a product + */ export enum ProductState { Created = 'Created', Released = 'Released', diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/property-filter-operator.ts b/src/Moryx.Orders.Web/app/src/app/api/models/property-filter-operator.ts index 284c76cb60..d7a51d18a7 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/models/property-filter-operator.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/models/property-filter-operator.ts @@ -6,6 +6,10 @@ /* eslint-disable */ /* Code generated by ng-openapi-gen DO NOT EDIT. */ + +/** + * Property filter operator expression + */ export enum PropertyFilterOperator { Equals = 'Equals', GreaterThen = 'GreaterThen', diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/property-filter.ts b/src/Moryx.Orders.Web/app/src/app/api/models/property-filter.ts index 40713e567f..3df23ab902 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/models/property-filter.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/models/property-filter.ts @@ -9,6 +9,10 @@ import { Entry } from '@moryx/ngx-web-framework/entry-editor'; /* Code generated by ng-openapi-gen DO NOT EDIT. */ import { PropertyFilterOperator } from '../models/property-filter-operator'; + +/** + * Property filter wrapper for the filtered entry + */ export interface PropertyFilter { entry?: Entry; operator?: PropertyFilterOperator; diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/recipe-classification-model.ts b/src/Moryx.Orders.Web/app/src/app/api/models/recipe-classification-model.ts index 63533c4fae..464552d006 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/models/recipe-classification-model.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/models/recipe-classification-model.ts @@ -6,6 +6,10 @@ /* eslint-disable */ /* Code generated by ng-openapi-gen DO NOT EDIT. */ + +/** + * Webservice compatible recipe classification enum + */ export enum RecipeClassificationModel { Unset = 'Unset', Default = 'Default', diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/recipe-filter.ts b/src/Moryx.Orders.Web/app/src/app/api/models/recipe-filter.ts index b24de3f941..8287b9eaec 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/models/recipe-filter.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/models/recipe-filter.ts @@ -6,6 +6,10 @@ /* eslint-disable */ /* Code generated by ng-openapi-gen DO NOT EDIT. */ + +/** + * Different options regarding the recipes of the product + */ export enum RecipeFilter { Unset = 'Unset', WithRecipe = 'WithRecipe', diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/recipe-model.ts b/src/Moryx.Orders.Web/app/src/app/api/models/recipe-model.ts index 0c33b3346a..7ba726c6f3 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/models/recipe-model.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/models/recipe-model.ts @@ -11,14 +11,38 @@ import { Entry } from '@moryx/ngx-web-framework/entry-editor'; import { RecipeClassificationModel } from '../models/recipe-classification-model'; import { RecipeState } from '../models/recipe-state'; import { WorkplanModel } from '../models/workplan-model'; + +/** + * DTO representation of a recipe + */ export interface RecipeModel { classification?: RecipeClassificationModel; + + /** + * Id of the recipe + */ id?: number; + + /** + * Whether this Recipe is a clone or not + */ isClone?: boolean; + + /** + * Name of the recipe + */ name?: string | null; properties?: Entry; + + /** + * Revision of the recipe + */ revision?: number; state?: RecipeState; + + /** + * Type of the recipe + */ type?: string | null; workplanModel?: WorkplanModel; } diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/recipe-state.ts b/src/Moryx.Orders.Web/app/src/app/api/models/recipe-state.ts index 079adcaba1..ad77b05513 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/models/recipe-state.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/models/recipe-state.ts @@ -6,6 +6,10 @@ /* eslint-disable */ /* Code generated by ng-openapi-gen DO NOT EDIT. */ + +/** + * A Recipe's state + */ export enum RecipeState { New = 'New', Released = 'Released', diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/report-context.ts b/src/Moryx.Orders.Web/app/src/app/api/models/report-context.ts index c1e24004e7..36f80207d9 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/models/report-context.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/models/report-context.ts @@ -7,14 +7,54 @@ /* Code generated by ng-openapi-gen DO NOT EDIT. */ import { RestrictionDescription } from '../models/restriction-description'; + +/** + * Report which is not processed. + */ export interface ReportContext { + + /** + * If `true` the operation can be reported finally + */ canFinal?: boolean; + + /** + * If `true` the operation can be reported partially + */ canPartial?: boolean; + + /** + * Currently reported failure count + */ reportedFailure?: number; + + /** + * Currently reported success count + */ reportedSuccess?: number; + + /** + * Reasons why a report is not possible + */ restrictions?: Array | null; + + /** + * Current failure count of the operation + */ scrapCount?: number; + + /** + * Current success count of the operation + */ successCount?: number; + + /** + * Value of unreported failure parts + */ unreportedFailure?: number; + + /** + * Value of unreported success parts + */ unreportedSuccess?: number; } diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/restriction-description.ts b/src/Moryx.Orders.Web/app/src/app/api/models/restriction-description.ts index bac17c3827..8f8aa8e482 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/models/restriction-description.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/models/restriction-description.ts @@ -7,7 +7,15 @@ /* Code generated by ng-openapi-gen DO NOT EDIT. */ import { RestrictionSeverity } from '../models/restriction-severity'; + +/** + * Description of the result of a performed rule + */ export interface RestrictionDescription { - severity?: RestrictionSeverity; - text?: string | null; + severity: RestrictionSeverity; + + /** + * Description of the result + */ + text: string | null; } diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/restriction-severity.ts b/src/Moryx.Orders.Web/app/src/app/api/models/restriction-severity.ts index 3078673bd5..51abce1560 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/models/restriction-severity.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/models/restriction-severity.ts @@ -6,6 +6,10 @@ /* eslint-disable */ /* Code generated by ng-openapi-gen DO NOT EDIT. */ + +/** + * Severity of a rule result + */ export enum RestrictionSeverity { Info = 'Info', Warning = 'Warning', diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/revision-filter.ts b/src/Moryx.Orders.Web/app/src/app/api/models/revision-filter.ts index 72974e513d..ac3edd3d29 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/models/revision-filter.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/models/revision-filter.ts @@ -6,6 +6,10 @@ /* eslint-disable */ /* Code generated by ng-openapi-gen DO NOT EDIT. */ + +/** + * Filter for revisions + */ export enum RevisionFilter { All = 'All', Latest = 'Latest', diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/selector.ts b/src/Moryx.Orders.Web/app/src/app/api/models/selector.ts index aa40edc551..0e018d1787 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/models/selector.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/models/selector.ts @@ -6,6 +6,10 @@ /* eslint-disable */ /* Code generated by ng-openapi-gen DO NOT EDIT. */ + +/** + * Determine which objects to select for the query + */ export enum Selector { Direct = 'Direct', Parent = 'Parent', diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/sse-item-base.ts b/src/Moryx.Orders.Web/app/src/app/api/models/sse-item-base.ts new file mode 100644 index 0000000000..8398125ce7 --- /dev/null +++ b/src/Moryx.Orders.Web/app/src/app/api/models/sse-item-base.ts @@ -0,0 +1,13 @@ +/* + * Copyright (c) 2026 Phoenix Contact GmbH & Co. KG + * Licensed under the Apache License, Version 2.0 +*/ + +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +export interface SseItemBase { + eventId?: string; + reconnectInterval?: string; + type?: string; +} diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/sse-item-of-operation-adviced-model.ts b/src/Moryx.Orders.Web/app/src/app/api/models/sse-item-of-operation-adviced-model.ts new file mode 100644 index 0000000000..cf25ac823b --- /dev/null +++ b/src/Moryx.Orders.Web/app/src/app/api/models/sse-item-of-operation-adviced-model.ts @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2026 Phoenix Contact GmbH & Co. KG + * Licensed under the Apache License, Version 2.0 +*/ + +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { OperationAdvicedModel } from '../models/operation-adviced-model'; +import { SseItemBase } from '../models/sse-item-base'; +export type SseItemOfOperationAdvicedModel = SseItemBase & { +'data'?: OperationAdvicedModel; +}; + diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/sse-item-of-operation-model.ts b/src/Moryx.Orders.Web/app/src/app/api/models/sse-item-of-operation-model.ts new file mode 100644 index 0000000000..d4f731f01d --- /dev/null +++ b/src/Moryx.Orders.Web/app/src/app/api/models/sse-item-of-operation-model.ts @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2026 Phoenix Contact GmbH & Co. KG + * Licensed under the Apache License, Version 2.0 +*/ + +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { OperationModel } from '../models/operation-model'; +import { SseItemBase } from '../models/sse-item-base'; +export type SseItemOfOperationModel = SseItemBase & { +'data'?: OperationModel; +}; + diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/sse-item-of-operation-reported-model.ts b/src/Moryx.Orders.Web/app/src/app/api/models/sse-item-of-operation-reported-model.ts new file mode 100644 index 0000000000..067e3a161a --- /dev/null +++ b/src/Moryx.Orders.Web/app/src/app/api/models/sse-item-of-operation-reported-model.ts @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2026 Phoenix Contact GmbH & Co. KG + * Licensed under the Apache License, Version 2.0 +*/ + +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { OperationReportedModel } from '../models/operation-reported-model'; +import { SseItemBase } from '../models/sse-item-base'; +export type SseItemOfOperationReportedModel = SseItemBase & { +'data'?: OperationReportedModel; +}; + diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/sse-item-of-operation-started-model.ts b/src/Moryx.Orders.Web/app/src/app/api/models/sse-item-of-operation-started-model.ts new file mode 100644 index 0000000000..45b3e8ddad --- /dev/null +++ b/src/Moryx.Orders.Web/app/src/app/api/models/sse-item-of-operation-started-model.ts @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2026 Phoenix Contact GmbH & Co. KG + * Licensed under the Apache License, Version 2.0 +*/ + +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { OperationStartedModel } from '../models/operation-started-model'; +import { SseItemBase } from '../models/sse-item-base'; +export type SseItemOfOperationStartedModel = SseItemBase & { +'data'?: OperationStartedModel; +}; + diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/staging-indicator.ts b/src/Moryx.Orders.Web/app/src/app/api/models/staging-indicator.ts index 45971d31f3..278310ded7 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/models/staging-indicator.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/models/staging-indicator.ts @@ -6,6 +6,11 @@ /* eslint-disable */ /* Code generated by ng-openapi-gen DO NOT EDIT. */ + +/** + * The material staging indicator defines the method of how needed materials can be supplied for production with the assistance of the Warehouse Management system. + * As with the location coordinates(warehouse number, storage type, and storage bin), the system files this indicator in the control cycle. + */ export enum StagingIndicator { NotRelevant = 'NotRelevant', PickPart = 'PickPart', diff --git a/src/Moryx.Orders.Web/app/src/app/api/models/workplan-state.ts b/src/Moryx.Orders.Web/app/src/app/api/models/workplan-state.ts index 3a00d745df..2c02396e8a 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/models/workplan-state.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/models/workplan-state.ts @@ -6,6 +6,10 @@ /* eslint-disable */ /* Code generated by ng-openapi-gen DO NOT EDIT. */ + +/** + * A workplan state + */ export enum WorkplanState { New = 'New', Released = 'Released', diff --git a/src/Moryx.Orders.Web/app/src/app/api/services/operator-management.service.ts b/src/Moryx.Orders.Web/app/src/app/api/services/operator-management.service.ts index 6ca63dbb97..363c4a0363 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/services/operator-management.service.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/services/operator-management.service.ts @@ -82,7 +82,7 @@ export class OperatorManagementService extends BaseService { * * This method sends `application/*+json` and handles request body of type `application/*+json`. */ - add$Response(params?: Add$Params, context?: HttpContext): Promise> { + add$Response(params: Add$Params, context?: HttpContext): Promise> { const obs = add(this.http, this.rootUrl, params, context); return firstValueFrom(obs); } @@ -93,7 +93,7 @@ export class OperatorManagementService extends BaseService { * * This method sends `application/*+json` and handles request body of type `application/*+json`. */ - add(params?: Add$Params, context?: HttpContext): Promise { + add(params: Add$Params, context?: HttpContext): Promise { const resp = this.add$Response(params, context); return resp.then((r: StrictHttpResponse): string => r.body); } diff --git a/src/Moryx.Orders.Web/app/src/app/api/services/order-management.service.ts b/src/Moryx.Orders.Web/app/src/app/api/services/order-management.service.ts index fadd7e50d3..b4091d366e 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/services/order-management.service.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/services/order-management.service.ts @@ -25,6 +25,7 @@ import { BeginContext } from '../models/begin-context'; import { beginOperation } from '../fn/order-management/begin-operation'; import { BeginOperation$Params } from '../fn/order-management/begin-operation'; import { DocumentModel } from '../models/document-model'; +import { FileStreamResult } from '../models/file-stream-result'; import { getAdviceContext } from '../fn/order-management/get-advice-context'; import { GetAdviceContext$Params } from '../fn/order-management/get-advice-context'; import { getAssignableRecipes } from '../fn/order-management/get-assignable-recipes'; @@ -49,7 +50,6 @@ import { getReportContext } from '../fn/order-management/get-report-context'; import { GetReportContext$Params } from '../fn/order-management/get-report-context'; import { interruptOperation } from '../fn/order-management/interrupt-operation'; import { InterruptOperation$Params } from '../fn/order-management/interrupt-operation'; -import { OperationChangedModel } from '../models/operation-changed-model'; import { OperationLogMessageModel } from '../models/operation-log-message-model'; import { OperationModel } from '../models/operation-model'; import { OperationRecipeModel } from '../models/operation-recipe-model'; @@ -61,6 +61,10 @@ import { Reload$Params } from '../fn/order-management/reload'; import { ReportContext } from '../models/report-context'; import { reportOperation } from '../fn/order-management/report-operation'; import { ReportOperation$Params } from '../fn/order-management/report-operation'; +import { SseItemOfOperationAdvicedModel } from '../models/sse-item-of-operation-adviced-model'; +import { SseItemOfOperationModel } from '../models/sse-item-of-operation-model'; +import { SseItemOfOperationReportedModel } from '../models/sse-item-of-operation-reported-model'; +import { SseItemOfOperationStartedModel } from '../models/sse-item-of-operation-started-model'; import { updateOperation } from '../fn/order-management/update-operation'; import { UpdateOperation$Params } from '../fn/order-management/update-operation'; @@ -74,6 +78,11 @@ export class OrderManagementService extends BaseService { static readonly GetOperationsPath = '/api/moryx/orders'; /** + * Retrieve all current operations that match the given filter parameters. + * Already completed or aborted Operations won't be included. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `getOperations()` instead. * @@ -85,6 +94,11 @@ export class OrderManagementService extends BaseService { } /** + * Retrieve all current operations that match the given filter parameters. + * Already completed or aborted Operations won't be included. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `getOperations$Response()` instead. * @@ -99,23 +113,31 @@ export class OrderManagementService extends BaseService { static readonly AddOperationPath = '/api/moryx/orders'; /** + * Add an operation to the order stock. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `addOperation()` instead. * * This method sends `application/*+json` and handles request body of type `application/*+json`. */ - addOperation$Response(params?: AddOperation$Params, context?: HttpContext): Promise> { + addOperation$Response(params: AddOperation$Params, context?: HttpContext): Promise> { const obs = addOperation(this.http, this.rootUrl, params, context); return firstValueFrom(obs); } /** + * Add an operation to the order stock. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `addOperation$Response()` instead. * * This method sends `application/*+json` and handles request body of type `application/*+json`. */ - addOperation(params?: AddOperation$Params, context?: HttpContext): Promise { + addOperation(params: AddOperation$Params, context?: HttpContext): Promise { const resp = this.addOperation$Response(params, context); return resp.then((r: StrictHttpResponse): OperationModel => r.body); } @@ -124,31 +146,44 @@ export class OrderManagementService extends BaseService { static readonly OperationStreamPath = '/api/moryx/orders/stream'; /** + * Stream that allow subscribing to operation changes. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `operationStream()` instead. * * This method doesn't expect any request body. */ - operationStream$Response(params?: OperationStream$Params, context?: HttpContext): Promise> { + operationStream$Response(params?: OperationStream$Params, context?: HttpContext): Promise> { const obs = operationStream(this.http, this.rootUrl, params, context); return firstValueFrom(obs); } /** + * Stream that allow subscribing to operation changes. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `operationStream$Response()` instead. * * This method doesn't expect any request body. */ - operationStream(params?: OperationStream$Params, context?: HttpContext): Promise { + operationStream(params?: OperationStream$Params, context?: HttpContext): Promise<(SseItemOfOperationStartedModel | SseItemOfOperationModel | SseItemOfOperationReportedModel | SseItemOfOperationReportedModel | SseItemOfOperationReportedModel | SseItemOfOperationAdvicedModel | SseItemOfOperationModel)> { const resp = this.operationStream$Response(params, context); - return resp.then((r: StrictHttpResponse): OperationChangedModel => r.body); + return resp.then((r: StrictHttpResponse<(SseItemOfOperationStartedModel | SseItemOfOperationModel | SseItemOfOperationReportedModel | SseItemOfOperationReportedModel | SseItemOfOperationReportedModel | SseItemOfOperationAdvicedModel | SseItemOfOperationModel)>): (SseItemOfOperationStartedModel | SseItemOfOperationModel | SseItemOfOperationReportedModel | SseItemOfOperationReportedModel | SseItemOfOperationReportedModel | SseItemOfOperationAdvicedModel | SseItemOfOperationModel) => r.body); } /** Path part for operation `getOperation()` */ static readonly GetOperationPath = '/api/moryx/orders/{guid}'; /** + * Retrieves an operationmodel using the unique id of the operation + * (Can load completed operations from storage). + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `getOperation()` instead. * @@ -160,6 +195,11 @@ export class OrderManagementService extends BaseService { } /** + * Retrieves an operationmodel using the unique id of the operation + * (Can load completed operations from storage). + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `getOperation$Response()` instead. * @@ -174,6 +214,10 @@ export class OrderManagementService extends BaseService { static readonly GetDocumentsPath = '/api/moryx/orders/{guid}/documents'; /** + * Retrieve the documents attached to operation with the given id. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `getDocuments()` instead. * @@ -185,6 +229,10 @@ export class OrderManagementService extends BaseService { } /** + * Retrieve the documents attached to operation with the given id. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `getDocuments$Response()` instead. * @@ -199,31 +247,43 @@ export class OrderManagementService extends BaseService { static readonly GetDocumentStreamPath = '/api/moryx/orders/{guid}/document/{identifier}/stream'; /** + * Retrieves the content of the document specified using the operation id and the identifier of the document. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `getDocumentStream()` instead. * * This method doesn't expect any request body. */ - getDocumentStream$Response(params: GetDocumentStream$Params, context?: HttpContext): Promise> { + getDocumentStream$Response(params: GetDocumentStream$Params, context?: HttpContext): Promise> { const obs = getDocumentStream(this.http, this.rootUrl, params, context); return firstValueFrom(obs); } /** + * Retrieves the content of the document specified using the operation id and the identifier of the document. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `getDocumentStream$Response()` instead. * * This method doesn't expect any request body. */ - getDocumentStream(params: GetDocumentStream$Params, context?: HttpContext): Promise { + getDocumentStream(params: GetDocumentStream$Params, context?: HttpContext): Promise { const resp = this.getDocumentStream$Response(params, context); - return resp.then((r: StrictHttpResponse): Blob => r.body); + return resp.then((r: StrictHttpResponse): FileStreamResult => r.body); } /** Path part for operation `getProductParts()` */ static readonly GetProductPartsPath = '/api/moryx/orders/{guid}/productparts'; /** + * Retrieve a list of product parts attached to the given operation. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `getProductParts()` instead. * @@ -235,6 +295,10 @@ export class OrderManagementService extends BaseService { } /** + * Retrieve a list of product parts attached to the given operation. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `getProductParts$Response()` instead. * @@ -249,6 +313,10 @@ export class OrderManagementService extends BaseService { static readonly GetBeginContextPath = '/api/moryx/orders/{guid}/begin'; /** + * Retrieves the begin context for the given operation. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `getBeginContext()` instead. * @@ -260,6 +328,10 @@ export class OrderManagementService extends BaseService { } /** + * Retrieves the begin context for the given operation. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `getBeginContext$Response()` instead. * @@ -274,6 +346,10 @@ export class OrderManagementService extends BaseService { static readonly BeginOperationPath = '/api/moryx/orders/{guid}/begin'; /** + * Begin producing the operation using the given parameters. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `beginOperation()` instead. * @@ -285,6 +361,10 @@ export class OrderManagementService extends BaseService { } /** + * Begin producing the operation using the given parameters. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `beginOperation$Response()` instead. * @@ -299,6 +379,10 @@ export class OrderManagementService extends BaseService { static readonly GetReportContextPath = '/api/moryx/orders/{guid}/report'; /** + * Retrieves a report context for the given operation. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `getReportContext()` instead. * @@ -310,6 +394,10 @@ export class OrderManagementService extends BaseService { } /** + * Retrieves a report context for the given operation. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `getReportContext$Response()` instead. * @@ -324,6 +412,10 @@ export class OrderManagementService extends BaseService { static readonly ReportOperationPath = '/api/moryx/orders/{guid}/report'; /** + * Report produced amounts of a given operation. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `reportOperation()` instead. * @@ -335,6 +427,10 @@ export class OrderManagementService extends BaseService { } /** + * Report produced amounts of a given operation. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `reportOperation$Response()` instead. * @@ -349,6 +445,10 @@ export class OrderManagementService extends BaseService { static readonly GetInterruptContextPath = '/api/moryx/orders/{guid}/interrupt'; /** + * Retrieves a interrupt context for the given operation. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `getInterruptContext()` instead. * @@ -360,6 +460,10 @@ export class OrderManagementService extends BaseService { } /** + * Retrieves a interrupt context for the given operation. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `getInterruptContext$Response()` instead. * @@ -374,6 +478,10 @@ export class OrderManagementService extends BaseService { static readonly InterruptOperationPath = '/api/moryx/orders/{guid}/interrupt'; /** + * Interrupt the given operation. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `interruptOperation()` instead. * @@ -385,6 +493,10 @@ export class OrderManagementService extends BaseService { } /** + * Interrupt the given operation. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `interruptOperation$Response()` instead. * @@ -399,6 +511,10 @@ export class OrderManagementService extends BaseService { static readonly GetAdviceContextPath = '/api/moryx/orders/{guid}/advice'; /** + * Retrieves a advice context for the given operation. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `getAdviceContext()` instead. * @@ -410,6 +526,10 @@ export class OrderManagementService extends BaseService { } /** + * Retrieves a advice context for the given operation. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `getAdviceContext$Response()` instead. * @@ -424,6 +544,10 @@ export class OrderManagementService extends BaseService { static readonly AdviceOperationPath = '/api/moryx/orders/{guid}/advice'; /** + * Advice operation. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `adviceOperation()` instead. * @@ -435,6 +559,10 @@ export class OrderManagementService extends BaseService { } /** + * Advice operation. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `adviceOperation$Response()` instead. * @@ -449,6 +577,10 @@ export class OrderManagementService extends BaseService { static readonly GetLogsPath = '/api/moryx/orders/{guid}/logs'; /** + * Retrieves logs written during the creation of the operation. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `getLogs()` instead. * @@ -460,6 +592,10 @@ export class OrderManagementService extends BaseService { } /** + * Retrieves logs written during the creation of the operation. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `getLogs$Response()` instead. * @@ -474,6 +610,10 @@ export class OrderManagementService extends BaseService { static readonly GetAssignableRecipesPath = '/api/moryx/orders/recipes'; /** + * Get's the list of recipes available to produce the given product. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `getAssignableRecipes()` instead. * @@ -485,6 +625,10 @@ export class OrderManagementService extends BaseService { } /** + * Get's the list of recipes available to produce the given product. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `getAssignableRecipes$Response()` instead. * @@ -499,6 +643,10 @@ export class OrderManagementService extends BaseService { static readonly AbortOperationPath = '/api/moryx/orders/{guid}/abort'; /** + * Abort the specified operation (Remove it before being started). + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `abortOperation()` instead. * @@ -510,6 +658,10 @@ export class OrderManagementService extends BaseService { } /** + * Abort the specified operation (Remove it before being started). + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `abortOperation$Response()` instead. * @@ -524,6 +676,10 @@ export class OrderManagementService extends BaseService { static readonly UpdateOperationPath = '/api/moryx/orders/{guid}/update'; /** + * Update the operation. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `updateOperation()` instead. * @@ -535,6 +691,10 @@ export class OrderManagementService extends BaseService { } /** + * Update the operation. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `updateOperation$Response()` instead. * @@ -549,6 +709,10 @@ export class OrderManagementService extends BaseService { static readonly ReloadPath = '/api/moryx/orders/{guid}/reload'; /** + * Reload the operation, rerunning the order assignment steps. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `reload()` instead. * @@ -560,6 +724,10 @@ export class OrderManagementService extends BaseService { } /** + * Reload the operation, rerunning the order assignment steps. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `reload$Response()` instead. * diff --git a/src/Moryx.Orders.Web/app/src/app/api/services/product-management.service.ts b/src/Moryx.Orders.Web/app/src/app/api/services/product-management.service.ts index 1041eed36b..9d2f5d4e02 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/services/product-management.service.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/services/product-management.service.ts @@ -65,6 +65,10 @@ export class ProductManagementService extends BaseService { static readonly GetProductCustomizationPath = '/api/moryx/products/configuration'; /** + * Loads dataset of existing products, recipes and importers for the UI. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `getProductCustomization()` instead. * @@ -76,6 +80,10 @@ export class ProductManagementService extends BaseService { } /** + * Loads dataset of existing products, recipes and importers for the UI. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `getProductCustomization$Response()` instead. * @@ -90,6 +98,10 @@ export class ProductManagementService extends BaseService { static readonly ImportPath = '/api/moryx/products/importers/{importerName}'; /** + * Run the product importer with the given parameters. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `import()` instead. * @@ -101,6 +113,10 @@ export class ProductManagementService extends BaseService { } /** + * Run the product importer with the given parameters. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `import$Response()` instead. * @@ -115,6 +131,10 @@ export class ProductManagementService extends BaseService { static readonly GetTypeByIdentityPath = '/api/moryx/products/types'; /** + * Retrieves all product types, if no identity is specified. Otherwise the model identified by that id is returned. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `getTypeByIdentity()` instead. * @@ -126,6 +146,10 @@ export class ProductManagementService extends BaseService { } /** + * Retrieves all product types, if no identity is specified. Otherwise the model identified by that id is returned. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `getTypeByIdentity$Response()` instead. * @@ -140,23 +164,31 @@ export class ProductManagementService extends BaseService { static readonly SaveTypePath = '/api/moryx/products/types'; /** + * Store the product type in the database. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `saveType()` instead. * * This method sends `application/*+json` and handles request body of type `application/*+json`. */ - saveType$Response(params?: SaveType$Params, context?: HttpContext): Promise> { + saveType$Response(params: SaveType$Params, context?: HttpContext): Promise> { const obs = saveType(this.http, this.rootUrl, params, context); return firstValueFrom(obs); } /** + * Store the product type in the database. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `saveType$Response()` instead. * * This method sends `application/*+json` and handles request body of type `application/*+json`. */ - saveType(params?: SaveType$Params, context?: HttpContext): Promise { + saveType(params: SaveType$Params, context?: HttpContext): Promise { const resp = this.saveType$Response(params, context); return resp.then((r: StrictHttpResponse): number => r.body); } @@ -165,23 +197,31 @@ export class ProductManagementService extends BaseService { static readonly GetTypesPath = '/api/moryx/products/types/query'; /** + * Query the product type database. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `getTypes()` instead. * * This method sends `application/*+json` and handles request body of type `application/*+json`. */ - getTypes$Response(params?: GetTypes$Params, context?: HttpContext): Promise>> { + getTypes$Response(params: GetTypes$Params, context?: HttpContext): Promise>> { const obs = getTypes(this.http, this.rootUrl, params, context); return firstValueFrom(obs); } /** + * Query the product type database. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `getTypes$Response()` instead. * * This method sends `application/*+json` and handles request body of type `application/*+json`. */ - getTypes(params?: GetTypes$Params, context?: HttpContext): Promise> { + getTypes(params: GetTypes$Params, context?: HttpContext): Promise> { const resp = this.getTypes$Response(params, context); return resp.then((r: StrictHttpResponse>): Array => r.body); } @@ -190,6 +230,10 @@ export class ProductManagementService extends BaseService { static readonly GetTypeByIdPath = '/api/moryx/products/types/{id}'; /** + * Get's a product type using the database id. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `getTypeById()` instead. * @@ -201,6 +245,10 @@ export class ProductManagementService extends BaseService { } /** + * Get's a product type using the database id. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `getTypeById$Response()` instead. * @@ -215,6 +263,10 @@ export class ProductManagementService extends BaseService { static readonly UpdateTypePath = '/api/moryx/products/types/{id}'; /** + * Updates the existing product type. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `updateType()` instead. * @@ -226,6 +278,10 @@ export class ProductManagementService extends BaseService { } /** + * Updates the existing product type. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `updateType$Response()` instead. * @@ -240,6 +296,10 @@ export class ProductManagementService extends BaseService { static readonly DuplicatePath = '/api/moryx/products/types/{id}'; /** + * Create a clone of the product type identified with the id with the new identitiy. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `duplicate()` instead. * @@ -251,6 +311,10 @@ export class ProductManagementService extends BaseService { } /** + * Create a clone of the product type identified with the id with the new identitiy. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `duplicate$Response()` instead. * @@ -265,6 +329,10 @@ export class ProductManagementService extends BaseService { static readonly DeleteTypePath = '/api/moryx/products/types/{id}'; /** + * Deletes the product type with the given id. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `deleteType()` instead. * @@ -276,6 +344,10 @@ export class ProductManagementService extends BaseService { } /** + * Deletes the product type with the given id. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `deleteType$Response()` instead. * @@ -290,6 +362,10 @@ export class ProductManagementService extends BaseService { static readonly GetRecipesPath = '/api/moryx/products/types/{id}/recipes/{classification}'; /** + * Loads the recipe attached to the product type with the id. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `getRecipes()` instead. * @@ -301,6 +377,10 @@ export class ProductManagementService extends BaseService { } /** + * Loads the recipe attached to the product type with the id. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `getRecipes$Response()` instead. * @@ -315,6 +395,10 @@ export class ProductManagementService extends BaseService { static readonly GetInstancePath = '/api/moryx/products/instances/{id}'; /** + * Get's the product instance with the given id. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `getInstance()` instead. * @@ -326,6 +410,10 @@ export class ProductManagementService extends BaseService { } /** + * Get's the product instance with the given id. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `getInstance$Response()` instead. * @@ -340,6 +428,10 @@ export class ProductManagementService extends BaseService { static readonly GetInstancesPath = '/api/moryx/products/instances'; /** + * Loads multiple product instances at once. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `getInstances()` instead. * @@ -351,6 +443,10 @@ export class ProductManagementService extends BaseService { } /** + * Loads multiple product instances at once. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `getInstances$Response()` instead. * @@ -365,23 +461,31 @@ export class ProductManagementService extends BaseService { static readonly SaveInstancePath = '/api/moryx/products/instances'; /** + * Save the instance in the product db. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `saveInstance()` instead. * * This method sends `application/*+json` and handles request body of type `application/*+json`. */ - saveInstance$Response(params?: SaveInstance$Params, context?: HttpContext): Promise> { + saveInstance$Response(params: SaveInstance$Params, context?: HttpContext): Promise> { const obs = saveInstance(this.http, this.rootUrl, params, context); return firstValueFrom(obs); } /** + * Save the instance in the product db. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `saveInstance$Response()` instead. * * This method sends `application/*+json` and handles request body of type `application/*+json`. */ - saveInstance(params?: SaveInstance$Params, context?: HttpContext): Promise { + saveInstance(params: SaveInstance$Params, context?: HttpContext): Promise { const resp = this.saveInstance$Response(params, context); return resp.then((r: StrictHttpResponse): void => r.body); } @@ -390,6 +494,10 @@ export class ProductManagementService extends BaseService { static readonly CreateInstancePath = '/api/moryx/products/instances'; /** + * Create a new product instace of the product type identified via the identifier and revision. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `createInstance()` instead. * @@ -401,6 +509,10 @@ export class ProductManagementService extends BaseService { } /** + * Create a new product instace of the product type identified via the identifier and revision. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `createInstance$Response()` instead. * @@ -415,6 +527,10 @@ export class ProductManagementService extends BaseService { static readonly GetRecipePath = '/api/moryx/products/recipes/{id}'; /** + * Get's a recipe by it's db id. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `getRecipe()` instead. * @@ -426,6 +542,10 @@ export class ProductManagementService extends BaseService { } /** + * Get's a recipe by it's db id. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `getRecipe$Response()` instead. * @@ -440,6 +560,10 @@ export class ProductManagementService extends BaseService { static readonly UpdateRecipePath = '/api/moryx/products/recipes/{id}'; /** + * Updates the existing recipes. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `updateRecipe()` instead. * @@ -451,6 +575,10 @@ export class ProductManagementService extends BaseService { } /** + * Updates the existing recipes. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `updateRecipe$Response()` instead. * @@ -465,23 +593,31 @@ export class ProductManagementService extends BaseService { static readonly SaveRecipePath = '/api/moryx/products/recipes'; /** + * Saves a new recipe in the database. + * + * + * * This method provides access to the full `HttpResponse`, allowing access to response headers. * To access only the response body, use `saveRecipe()` instead. * * This method sends `application/*+json` and handles request body of type `application/*+json`. */ - saveRecipe$Response(params?: SaveRecipe$Params, context?: HttpContext): Promise> { + saveRecipe$Response(params: SaveRecipe$Params, context?: HttpContext): Promise> { const obs = saveRecipe(this.http, this.rootUrl, params, context); return firstValueFrom(obs); } /** + * Saves a new recipe in the database. + * + * + * * This method provides access only to the response body. * To access the full response (for headers, for example), `saveRecipe$Response()` instead. * * This method sends `application/*+json` and handles request body of type `application/*+json`. */ - saveRecipe(params?: SaveRecipe$Params, context?: HttpContext): Promise { + saveRecipe(params: SaveRecipe$Params, context?: HttpContext): Promise { const resp = this.saveRecipe$Response(params, context); return resp.then((r: StrictHttpResponse): number => r.body); } diff --git a/src/Moryx.Orders.Web/app/src/app/api/services/workplan.service.ts b/src/Moryx.Orders.Web/app/src/app/api/services/workplan.service.ts index 66c4bf2229..47b36e29fc 100644 --- a/src/Moryx.Orders.Web/app/src/app/api/services/workplan.service.ts +++ b/src/Moryx.Orders.Web/app/src/app/api/services/workplan.service.ts @@ -68,7 +68,7 @@ export class WorkplanService extends BaseService { * * This method sends `application/*+json` and handles request body of type `application/*+json`. */ - saveWorkplan$Response(params?: SaveWorkplan$Params, context?: HttpContext): Promise> { + saveWorkplan$Response(params: SaveWorkplan$Params, context?: HttpContext): Promise> { const obs = saveWorkplan(this.http, this.rootUrl, params, context); return firstValueFrom(obs); } @@ -79,7 +79,7 @@ export class WorkplanService extends BaseService { * * This method sends `application/*+json` and handles request body of type `application/*+json`. */ - saveWorkplan(params?: SaveWorkplan$Params, context?: HttpContext): Promise { + saveWorkplan(params: SaveWorkplan$Params, context?: HttpContext): Promise { const resp = this.saveWorkplan$Response(params, context); return resp.then((r: StrictHttpResponse): void => r.body); } diff --git a/src/Moryx.Orders.Web/app/src/app/components/operation-recipes/operation-recipes.ts b/src/Moryx.Orders.Web/app/src/app/components/operation-recipes/operation-recipes.ts index 02aa609fd9..ab6d1012a4 100644 --- a/src/Moryx.Orders.Web/app/src/app/components/operation-recipes/operation-recipes.ts +++ b/src/Moryx.Orders.Web/app/src/app/components/operation-recipes/operation-recipes.ts @@ -181,7 +181,7 @@ export class OperationRecipes implements OnInit { await this.productManagementService .updateRecipe({ id: this.selectedRecipe()!.id!, - body: this.selectedRecipe() + body: this.selectedRecipe()! }) .catch( async (e: HttpErrorResponse) => await this.snackbarService.handleError(e) diff --git a/src/StartProject.Asp/Program.cs b/src/StartProject.Asp/Program.cs index ea1855b795..567fe9cd60 100644 --- a/src/StartProject.Asp/Program.cs +++ b/src/StartProject.Asp/Program.cs @@ -5,7 +5,8 @@ using System.Text.Json.Serialization; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Localization; -using Microsoft.AspNetCore.Mvc.Controllers; +using Microsoft.OpenApi; +using Moryx.AspNetCore.OpenApi; using Moryx.Launcher; using Moryx.Model; using Moryx.Runtime.Kernel; @@ -51,12 +52,17 @@ builder.Services.AddRazorPages(); -builder.Services.AddControllers() - .AddJsonOptions(jo => jo.JsonSerializerOptions.Converters.Add(new JsonStringEnumConverter())); +builder.Services.ConfigureHttpJsonOptions(options => +{ + options.SerializerOptions.Converters.Add(new JsonStringEnumConverter()); + options.SerializerOptions.NumberHandling = JsonNumberHandling.Strict; // https://github.com/dotnet/aspnetcore/issues/64501 +}); +builder.Services.AddControllers(); -builder.Services.AddSwaggerGen(c => +builder.Services.AddOpenApi(static options => { - c.CustomOperationIds(api => ((ControllerActionDescriptor)api.ActionDescriptor).MethodInfo.Name); + options.OpenApiVersion = OpenApiSpecVersion.OpenApi3_0; // OpenApi3_2 is only available with .net 11 + options.ConfigureMoryxTransformers(); }); builder.Services.AddSingleton(); @@ -82,8 +88,11 @@ if (app.Environment.IsDevelopment()) { app.UseDeveloperExceptionPage(); - app.UseSwagger(); - app.UseSwaggerUI(); + + app.MapOpenApi("/openapi/{documentName}.yaml"); + app.MapOpenApi("/openapi/{documentName}.json"); + app.UseSwaggerUI(options => options.SwaggerEndpoint("/openapi/v1.yaml", "v1") + ); } app.UseRequestLocalization(); @@ -101,6 +110,13 @@ app.MapControllers().WithMetadata(new AllowAnonymousAttribute()); app.MapRazorPages(); +if (app.Environment.IsOpenApiBuildTime()) +{ + await app.Services.WriteYamlOpenApiSpec("framework-api.yaml"); + await app.RunAsync(); + return; +} + var moduleManager = app.Services.GetRequiredService(); await moduleManager.StartModulesAsync(); diff --git a/src/StartProject.Asp/Properties/launchSettings.json b/src/StartProject.Asp/Properties/launchSettings.json index 615e1c1f91..90999651ca 100644 --- a/src/StartProject.Asp/Properties/launchSettings.json +++ b/src/StartProject.Asp/Properties/launchSettings.json @@ -19,6 +19,16 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "PathBase" } + }, + "Debug ApiSpecGeneration": { + "commandName": "Project", + "commandLineArgs": "--output ..\\..\\schemas --openapi-version OpenApi3_0 --file-name framework-api", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "OpenApiBuildTime" + }, + "dotnetRunMessages": true, + "applicationUrl": "https://localhost:5001" } } } diff --git a/src/StartProject.Asp/StartProject.Asp.csproj b/src/StartProject.Asp/StartProject.Asp.csproj index b26c157d51..573303623d 100644 --- a/src/StartProject.Asp/StartProject.Asp.csproj +++ b/src/StartProject.Asp/StartProject.Asp.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -6,13 +6,25 @@ - + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + all runtime; build; native; analyzers; buildtransitive + + true + $(MSBuildProjectDirectory)/../../schemas + --openapi-version OpenApi3_0 --file-name framework-api + OpenApiBuildTime + + @@ -65,6 +77,7 @@ +