Skip to content

Commit

Permalink
chore: update schema
Browse files Browse the repository at this point in the history
  • Loading branch information
olavis committed Sep 15, 2023
1 parent d0d7571 commit bdf9382
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/hooks/useAnalogueModels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@ import { useAccessToken } from './useAccessToken'
type UseQueryOptions<T> = ParamsOption<T> &
RequestBodyOption<T> & {
// add your custom options here
// token: string
params?: {
path: {
id: string
}
}
}

const ANALOGUEMODELS_KEY = '/api/analoguemodels'
const NC_FILE_KEY = '/api/analoguemodels/{id}/input-models'
const ANALOGUEMODELS_KEY = '/api/analogue-models'
const NC_FILE_KEY = '/api/analogue-models/{id}/netcdf-models'

export function useAnalogueModels() {
const apiClient = useApiClient()
Expand Down
62 changes: 59 additions & 3 deletions src/models/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


export interface paths {
"/api/analoguemodels/{id}/parameters": {
"/api/analogue-models/{id}/parameters": {
post: {
parameters: {
path: {
Expand All @@ -30,7 +30,7 @@ export interface paths {
};
};
};
"/api/analoguemodels": {
"/api/analogue-models": {
/** Get a list of all AnalogueModels */
get: {
responses: {
Expand Down Expand Up @@ -68,7 +68,7 @@ export interface paths {
};
};
};
"/api/analoguemodels/{id}": {
"/api/analogue-models/{id}": {
/** Get AnalogueModel by id */
get: {
parameters: {
Expand Down Expand Up @@ -177,6 +177,62 @@ export interface paths {
404: {
content: {
"application/json": components["schemas"]["ErrorResponse"];
"application/xml": components["schemas"]["ErrorResponse"];
};
};
};
};
};
"/api/analogue-models/{id}/input-models": {
/** Upload model files that later can be converted to PEPM models. */
post: {
parameters: {
path: {
id: string;
};
};
requestBody?: {
content: {
"multipart/form-data": {
/** Format: binary */
File?: string;
FileType?: components["schemas"]["UploadFileType"];
};
};
};
responses: {
/** @description Success */
200: {
content: {
"application/json": components["schemas"]["UploadAnalogueModelCommandResponse"];
"application/xml": components["schemas"]["UploadAnalogueModelCommandResponse"];
};
};
};
};
};
"/api/analogue-models/{id}/netcdf-models": {
/** Upload NetCDF model files that later can be converted to PEPM models. */
post: {
parameters: {
path: {
id: string;
};
};
requestBody?: {
content: {
"multipart/form-data": {
/** Format: binary */
file?: string;
};
};
};
responses: {
/** @description Success */
200: {
content: {
"application/json": components["schemas"]["UploadAnalogueModelCommandResponse"];
"application/xml": components["schemas"]["UploadAnalogueModelCommandResponse"];
};
};
};
Expand Down

0 comments on commit bdf9382

Please sign in to comment.