F1: openapi.json regenerated from the merged API, client regenerated, training form types
The checked-in document listed routes the API no longer has; the inputs route now types its response, so the training form reads allowed by index and the schema type drops the JSON schema's own $defs.
This commit is contained in:
-448
@@ -3000,26 +3000,6 @@
|
||||
"title": "Source",
|
||||
"type": "object"
|
||||
},
|
||||
"SourceRef": {
|
||||
"properties": {
|
||||
"args": {
|
||||
"additionalProperties": true,
|
||||
"default": {},
|
||||
"title": "Args",
|
||||
"type": "object"
|
||||
},
|
||||
"source": {
|
||||
"pattern": "^[A-Za-z_][\\w.]*:[A-Za-z_]\\w*$",
|
||||
"title": "Source",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"source"
|
||||
],
|
||||
"title": "SourceRef",
|
||||
"type": "object"
|
||||
},
|
||||
"SourceType": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
@@ -3647,93 +3627,6 @@
|
||||
"title": "UserRead",
|
||||
"type": "object"
|
||||
},
|
||||
"UserUpdate": {
|
||||
"properties": {
|
||||
"domains": {
|
||||
"anyOf": [
|
||||
{
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/Domain"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "Domains"
|
||||
},
|
||||
"email": {
|
||||
"anyOf": [
|
||||
{
|
||||
"format": "email",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "Email"
|
||||
},
|
||||
"is_active": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "Is Active"
|
||||
},
|
||||
"is_superuser": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "Is Superuser"
|
||||
},
|
||||
"is_verified": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "Is Verified"
|
||||
},
|
||||
"name": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "Name"
|
||||
},
|
||||
"password": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "Password"
|
||||
}
|
||||
},
|
||||
"title": "UserUpdate",
|
||||
"type": "object"
|
||||
},
|
||||
"ValidationError": {
|
||||
"properties": {
|
||||
"ctx": {
|
||||
@@ -4200,33 +4093,6 @@
|
||||
"summary": "Health"
|
||||
}
|
||||
},
|
||||
"/ingest/concept-maps": {
|
||||
"get": {
|
||||
"description": "Every ConceptMap a site saved: its id, latest version and when.",
|
||||
"operationId": "concept_maps",
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"items": {
|
||||
"additionalProperties": true,
|
||||
"type": "object"
|
||||
},
|
||||
"title": "Response Concept Maps",
|
||||
"type": "array"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Successful Response"
|
||||
}
|
||||
},
|
||||
"summary": "Concept Maps",
|
||||
"tags": [
|
||||
"ingest"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/ingest/concept-maps/{map_id}": {
|
||||
"get": {
|
||||
"description": "A site's codes in platform terms (FHIR R4B ConceptMap), latest version.",
|
||||
@@ -4796,52 +4662,6 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/ingest/sources/resources": {
|
||||
"post": {
|
||||
"description": "What a source offers (a database's tables...): also tests that it can be reached.",
|
||||
"operationId": "source_resources",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/SourceRef"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": "Response Source Resources",
|
||||
"type": "array"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Successful Response"
|
||||
},
|
||||
"422": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Validation Error"
|
||||
}
|
||||
},
|
||||
"summary": "Source Resources",
|
||||
"tags": [
|
||||
"ingest"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/ingest/sources/test": {
|
||||
"post": {
|
||||
"description": "\"Probar conexi\u00f3n\": reaches the source with the answers given. A database lists its\ntables (until one is picked; then its first rows); files and records show their first\nrows. Never a server error: what went wrong comes back in plain words.",
|
||||
@@ -6809,80 +6629,6 @@
|
||||
"tags": [
|
||||
"users"
|
||||
]
|
||||
},
|
||||
"patch": {
|
||||
"operationId": "users:patch_current_user",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UserUpdate"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UserRead"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Successful Response"
|
||||
},
|
||||
"400": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"examples": {
|
||||
"UPDATE_USER_EMAIL_ALREADY_EXISTS": {
|
||||
"summary": "A user with this email already exists.",
|
||||
"value": {
|
||||
"detail": "UPDATE_USER_EMAIL_ALREADY_EXISTS"
|
||||
}
|
||||
},
|
||||
"UPDATE_USER_INVALID_PASSWORD": {
|
||||
"summary": "Password validation failed.",
|
||||
"value": {
|
||||
"detail": {
|
||||
"code": "UPDATE_USER_INVALID_PASSWORD",
|
||||
"reason": "Password should beat least 3 characters"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorModel"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Bad Request"
|
||||
},
|
||||
"401": {
|
||||
"description": "Missing token or inactive user."
|
||||
},
|
||||
"422": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Validation Error"
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"APIKeyCookie": []
|
||||
}
|
||||
],
|
||||
"summary": "Users:Patch Current User",
|
||||
"tags": [
|
||||
"users"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/users/register": {
|
||||
@@ -6958,200 +6704,6 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/users/{id}": {
|
||||
"delete": {
|
||||
"operationId": "users:delete_user",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"title": "Id",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "Successful Response"
|
||||
},
|
||||
"401": {
|
||||
"description": "Missing token or inactive user."
|
||||
},
|
||||
"403": {
|
||||
"description": "Not a superuser."
|
||||
},
|
||||
"404": {
|
||||
"description": "The user does not exist."
|
||||
},
|
||||
"422": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Validation Error"
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"APIKeyCookie": []
|
||||
}
|
||||
],
|
||||
"summary": "Users:Delete User",
|
||||
"tags": [
|
||||
"users"
|
||||
]
|
||||
},
|
||||
"get": {
|
||||
"operationId": "users:user",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"title": "Id",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UserRead"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Successful Response"
|
||||
},
|
||||
"401": {
|
||||
"description": "Missing token or inactive user."
|
||||
},
|
||||
"403": {
|
||||
"description": "Not a superuser."
|
||||
},
|
||||
"404": {
|
||||
"description": "The user does not exist."
|
||||
},
|
||||
"422": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Validation Error"
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"APIKeyCookie": []
|
||||
}
|
||||
],
|
||||
"summary": "Users:User",
|
||||
"tags": [
|
||||
"users"
|
||||
]
|
||||
},
|
||||
"patch": {
|
||||
"operationId": "users:patch_user",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"title": "Id",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UserUpdate"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UserRead"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Successful Response"
|
||||
},
|
||||
"400": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"examples": {
|
||||
"UPDATE_USER_EMAIL_ALREADY_EXISTS": {
|
||||
"summary": "A user with this email already exists.",
|
||||
"value": {
|
||||
"detail": "UPDATE_USER_EMAIL_ALREADY_EXISTS"
|
||||
}
|
||||
},
|
||||
"UPDATE_USER_INVALID_PASSWORD": {
|
||||
"summary": "Password validation failed.",
|
||||
"value": {
|
||||
"detail": {
|
||||
"code": "UPDATE_USER_INVALID_PASSWORD",
|
||||
"reason": "Password should beat least 3 characters"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorModel"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Bad Request"
|
||||
},
|
||||
"401": {
|
||||
"description": "Missing token or inactive user."
|
||||
},
|
||||
"403": {
|
||||
"description": "Not a superuser."
|
||||
},
|
||||
"404": {
|
||||
"description": "The user does not exist."
|
||||
},
|
||||
"422": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Validation Error"
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"APIKeyCookie": []
|
||||
}
|
||||
],
|
||||
"summary": "Users:Patch User",
|
||||
"tags": [
|
||||
"users"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/{domain}/fhir": {
|
||||
"post": {
|
||||
"description": "A standard hospital's Bundle: checked as FHIR, kept as sent in the sender's inbox,\nand placed by the sender's pipeline (a run starts; follow it at the Location).",
|
||||
|
||||
@@ -13,8 +13,6 @@ export type { ExecutionHealth$Params as ExecutionHealth$Params } from './fn/exec
|
||||
export { executionHealth as executionHealth } from './fn/execution/execution-health';
|
||||
export type { ExecutionOptions$Params as ExecutionOptions$Params } from './fn/execution/execution-options';
|
||||
export { executionOptions as executionOptions } from './fn/execution/execution-options';
|
||||
export type { ConceptMaps$Params as ConceptMaps$Params } from './fn/ingest/concept-maps';
|
||||
export { conceptMaps as conceptMaps } from './fn/ingest/concept-maps';
|
||||
export type { GetConceptMap$Params as GetConceptMap$Params } from './fn/ingest/get-concept-map';
|
||||
export { getConceptMap as getConceptMap } from './fn/ingest/get-concept-map';
|
||||
export type { SaveConceptMap$Params as SaveConceptMap$Params } from './fn/ingest/save-concept-map';
|
||||
@@ -37,8 +35,6 @@ export type { OauthStart$Params as OauthStart$Params } from './fn/ingest/oauth-s
|
||||
export { oauthStart as oauthStart } from './fn/ingest/oauth-start';
|
||||
export type { SourcePreview$Params as SourcePreview$Params } from './fn/ingest/source-preview';
|
||||
export { sourcePreview as sourcePreview } from './fn/ingest/source-preview';
|
||||
export type { SourceResources$Params as SourceResources$Params } from './fn/ingest/source-resources';
|
||||
export { sourceResources as sourceResources } from './fn/ingest/source-resources';
|
||||
export type { TestSource$Params as TestSource$Params } from './fn/ingest/test-source';
|
||||
export { testSource as testSource } from './fn/ingest/test-source';
|
||||
export type { SourceTypes$Params as SourceTypes$Params } from './fn/ingest/source-types';
|
||||
@@ -115,16 +111,8 @@ export type { PreviewStatus$Params as PreviewStatus$Params } from './fn/preview/
|
||||
export { previewStatus as previewStatus } from './fn/preview/preview-status';
|
||||
export type { UsersCurrentUser$Params as UsersCurrentUser$Params } from './fn/users/users-current-user';
|
||||
export { usersCurrentUser as usersCurrentUser } from './fn/users/users-current-user';
|
||||
export type { UsersPatchCurrentUser$Params as UsersPatchCurrentUser$Params } from './fn/users/users-patch-current-user';
|
||||
export { usersPatchCurrentUser as usersPatchCurrentUser } from './fn/users/users-patch-current-user';
|
||||
export type { RegisterRegister$Params as RegisterRegister$Params } from './fn/users/register-register';
|
||||
export { registerRegister as registerRegister } from './fn/users/register-register';
|
||||
export type { UsersUser$Params as UsersUser$Params } from './fn/users/users-user';
|
||||
export { usersUser as usersUser } from './fn/users/users-user';
|
||||
export type { UsersDeleteUser$Params as UsersDeleteUser$Params } from './fn/users/users-delete-user';
|
||||
export { usersDeleteUser as usersDeleteUser } from './fn/users/users-delete-user';
|
||||
export type { UsersPatchUser$Params as UsersPatchUser$Params } from './fn/users/users-patch-user';
|
||||
export { usersPatchUser as usersPatchUser } from './fn/users/users-patch-user';
|
||||
export type { PostBundle$Params as PostBundle$Params } from './fn/fhir/post-bundle';
|
||||
export { postBundle as postBundle } from './fn/fhir/post-bundle';
|
||||
export type { SearchCondition$Params as SearchCondition$Params } from './fn/fhir/search-condition';
|
||||
|
||||
@@ -60,7 +60,6 @@ export type { SignIn } from './models/sign-in';
|
||||
export type { Site } from './models/site';
|
||||
export type { SiteTrainingSource } from './models/site-training-source';
|
||||
export type { Source } from './models/source';
|
||||
export type { SourceRef } from './models/source-ref';
|
||||
export type { SourceType } from './models/source-type';
|
||||
export type { Step } from './models/step';
|
||||
export type { Study } from './models/study';
|
||||
@@ -73,7 +72,6 @@ export type { TrainingSource } from './models/training-source';
|
||||
export type { Uploaded } from './models/uploaded';
|
||||
export type { UserCreate } from './models/user-create';
|
||||
export type { UserRead } from './models/user-read';
|
||||
export type { UserUpdate } from './models/user-update';
|
||||
export type { ValidationError } from './models/validation-error';
|
||||
export type { Version } from './models/version';
|
||||
export type { Worker } from './models/worker';
|
||||
|
||||
@@ -32,7 +32,7 @@ import type { TrainingSource } from '../api/models/training-source';
|
||||
import { FORMLY_TYPES } from '../conectar/schema-form';
|
||||
import { errorText } from './run-monitor';
|
||||
|
||||
type Schema = JSONSchema7 & { $defs?: Record<string, Schema> };
|
||||
type Schema = Omit<JSONSchema7, '$defs'> & { $defs?: Record<string, Schema> };
|
||||
|
||||
export function trainingForm(config: TrainingConfig) {
|
||||
const raw = structuredClone(config.json_schema) as Schema;
|
||||
@@ -41,7 +41,7 @@ export function trainingForm(config: TrainingConfig) {
|
||||
delete raw.properties?.['execution'];
|
||||
raw.required = raw.required?.filter((key) => key !== 'execution');
|
||||
if (raw.properties?.['source']) {
|
||||
const folder = raw.$defs!['FolderTrainingSource'];
|
||||
const folder = raw.$defs!['FolderTrainingSource']!;
|
||||
raw.properties['source'] = {
|
||||
...folder,
|
||||
title: 'Datos de entrenamiento',
|
||||
@@ -140,7 +140,7 @@ function allowedFile(file: File, allowed: string[]): boolean {
|
||||
type="file"
|
||||
multiple
|
||||
required
|
||||
[accept]="accept(metadata.allowed)"
|
||||
[accept]="accept(metadata['allowed'])"
|
||||
hidden
|
||||
aria-label="Archivos"
|
||||
(change)="selectedFiles.set(files.files)"
|
||||
@@ -279,7 +279,7 @@ export class Training {
|
||||
|
||||
protected async upload(set: string, input: HTMLInputElement): Promise<void> {
|
||||
const files = Array.from(input.files ?? []);
|
||||
const allowed = this.inputs.hasValue() ? (this.inputs.value()?.allowed ?? []) : [];
|
||||
const allowed = this.inputs.hasValue() ? (this.inputs.value()?.['allowed'] ?? []) : [];
|
||||
if (!files.length || files.some((file) => !allowedFile(file, allowed))) {
|
||||
this.uploadMessage.set('Archivos permitidos: ' + allowed.join(', '));
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user