diff --git a/src/app/api.schema.d.ts b/src/app/api.schema.d.ts index 368f4f1..a1c25d0 100644 --- a/src/app/api.schema.d.ts +++ b/src/app/api.schema.d.ts @@ -27,6 +27,11 @@ export interface paths { * @description Retrieve a single model by its ID */ get: operations["getModelById"]; + /** + * Delete a Model + * @description Delete a single model by its ID + */ + delete: operations["deleteModelById"]; }; "/v1/models/legacy/{id}": { /** @@ -34,11 +39,6 @@ export interface paths { * @description Retrieve a single model by its ID */ get: operations["getLegacyModelById"]; - /** - * Delete a Model - * @description Delete a single model by its ID - */ - delete: operations["deleteModelById"]; }; "/v1/models/{modelId}/predict": { /** @@ -216,6 +216,11 @@ export interface components { * @example A feature name */ name: string; + /** + * @description A name for the feature that will appear on top of the form field + * @example A feature unit + */ + units?: string; description?: string; featureType: components["schemas"]["FeatureType"]; /** @@ -505,22 +510,20 @@ export interface operations { }; }; /** - * Get a legacy model - * @description Retrieve a single model by its ID + * Delete a Model + * @description Delete a single model by its ID */ - getLegacyModelById: { + deleteModelById: { parameters: { path: { - /** @description The ID of the model to retrieve */ - id: string; + /** @description The ID of the model to delete */ + id: number; }; }; responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": components["schemas"]["Model"]; - }; + /** @description Model deleted successfully */ + 204: { + content: never; }; /** @description Model not found */ 404: { @@ -529,20 +532,22 @@ export interface operations { }; }; /** - * Delete a Model - * @description Delete a single model by its ID + * Get a legacy model + * @description Retrieve a single model by its ID */ - deleteModelById: { + getLegacyModelById: { parameters: { path: { - /** @description The ID of the model to delete */ - id: number; + /** @description The ID of the model to retrieve */ + id: string; }; }; responses: { - /** @description Model deleted successfully */ - 204: { - content: never; + /** @description Successful Response */ + 200: { + content: { + "application/json": components["schemas"]["Model"]; + }; }; /** @description Model not found */ 404: { @@ -675,6 +680,11 @@ export interface operations { * @example Updated Feature Name */ name: string; + /** + * @description The units that this feature is using + * @example mg/L + */ + units?: string; /** @example An updated description for this feature */ description?: string; featureType: components["schemas"]["FeatureType"]; diff --git a/src/app/dashboard/models/[modelId]/components/FeatureEditModal.tsx b/src/app/dashboard/models/[modelId]/components/FeatureEditModal.tsx index 5935349..0509810 100644 --- a/src/app/dashboard/models/[modelId]/components/FeatureEditModal.tsx +++ b/src/app/dashboard/models/[modelId]/components/FeatureEditModal.tsx @@ -97,6 +97,7 @@ export default function FeatureEditModal({ >({ key: feature.key, name: feature.name, + units: feature.units, description: feature.description ?? '', featureType: feature.featureType, }); @@ -179,6 +180,16 @@ export default function FeatureEditModal({ isRequired > +