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:
@@ -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