Skip to content

Commit

Permalink
feat: Generate client for "analyse haut niveau management" in frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
Tsukoyachi committed Oct 23, 2024
1 parent 314a7b9 commit 51f394a
Show file tree
Hide file tree
Showing 18 changed files with 732 additions and 30 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ quarkus.oidc.application-type=web-app
# Docker build properties
quarkus.container-image.registry=ghcr.io

# Quarkus swagger UI
quarkus.swagger-ui.always-include=true
quarkus.swagger-ui.path=/swagger-ui
quarkus.smallrye-openapi.enable=true
quarkus.smallrye-openapi.format=yaml
quarkus.smallrye-openapi.store-schema-directory=target/generated/

quarkus.http.port=${PORT:8084}
quarkus.metric.enabled=true

Expand Down
2 changes: 1 addition & 1 deletion cloud/frontend/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/env bash

# List of environment variables to include
include_vars=("ALERT_MANAGEMENT_BASE_URL" "PATIENT_MANAGEMENT_BASE_URL")
include_vars=("ALERT_MANAGEMENT_BASE_URL" "PATIENT_MANAGEMENT_BASE_URL" "ANALYSE_HAUT_NIVEAU_MANAGEMENT_BASE_URL")

# Convert specified environment variables to JSON format
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
openapi: 3.0.3
info:
title: analyse-haut-niveau-management API
version: 1.0.0-SNAPSHOT
servers:
- url: http://localhost:8084
description: Auto generated value
- url: http://0.0.0.0:8084
description: Auto generated value
paths:
/metrics/kpis:
get:
tags:
- Metrics Resource
parameters:
- name: end
in: query
schema:
type: string
- name: start
in: query
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/JsonObject"
components:
schemas:
JsonObject:
type: array
items:
type: object
properties:
key:
type: string
value: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
wwwroot/*.js
node_modules
typings
dist
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs

# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux

# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.gitignore
.npmignore
.openapi-generator-ignore
api.ts
api/metrics-resource-api.ts
base.ts
common.ts
configuration.ts
git_push.sh
index.ts
models/index.ts
models/json-object-inner.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7.9.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/* tslint:disable */
/* eslint-disable */
/**
* analyse-haut-niveau-management API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0-SNAPSHOT
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/



export * from './api/metrics-resource-api';

Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
/* tslint:disable */
/* eslint-disable */
/**
* analyse-haut-niveau-management API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0-SNAPSHOT
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import globalAxios from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
// @ts-ignore
import type { JsonObjectInner } from '../models';
/**
* MetricsResourceApi - axios parameter creator
* @export
*/
export const MetricsResourceApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
*
* @param {string} [end]
* @param {string} [start]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
metricsKpisGet: async (end?: string, start?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/metrics/kpis`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}

const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;

if (end !== undefined) {
localVarQueryParameter['end'] = end;
}

if (start !== undefined) {
localVarQueryParameter['start'] = start;
}



setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
}
};

/**
* MetricsResourceApi - functional programming interface
* @export
*/
export const MetricsResourceApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = MetricsResourceApiAxiosParamCreator(configuration)
return {
/**
*
* @param {string} [end]
* @param {string} [start]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async metricsKpisGet(end?: string, start?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<JsonObjectInner>>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.metricsKpisGet(end, start, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['MetricsResourceApi.metricsKpisGet']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
}
};

/**
* MetricsResourceApi - factory interface
* @export
*/
export const MetricsResourceApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = MetricsResourceApiFp(configuration)
return {
/**
*
* @param {MetricsResourceApiMetricsKpisGetRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
metricsKpisGet(requestParameters: MetricsResourceApiMetricsKpisGetRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<Array<JsonObjectInner>> {
return localVarFp.metricsKpisGet(requestParameters.end, requestParameters.start, options).then((request) => request(axios, basePath));
},
};
};

/**
* Request parameters for metricsKpisGet operation in MetricsResourceApi.
* @export
* @interface MetricsResourceApiMetricsKpisGetRequest
*/
export interface MetricsResourceApiMetricsKpisGetRequest {
/**
*
* @type {string}
* @memberof MetricsResourceApiMetricsKpisGet
*/
readonly end?: string

/**
*
* @type {string}
* @memberof MetricsResourceApiMetricsKpisGet
*/
readonly start?: string
}

/**
* MetricsResourceApi - object-oriented interface
* @export
* @class MetricsResourceApi
* @extends {BaseAPI}
*/
export class MetricsResourceApi extends BaseAPI {
/**
*
* @param {MetricsResourceApiMetricsKpisGetRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof MetricsResourceApi
*/
public metricsKpisGet(requestParameters: MetricsResourceApiMetricsKpisGetRequest = {}, options?: RawAxiosRequestConfig) {
return MetricsResourceApiFp(this.configuration).metricsKpisGet(requestParameters.end, requestParameters.start, options).then((request) => request(this.axios, this.basePath));
}
}

Loading

0 comments on commit 51f394a

Please sign in to comment.