diff --git a/dictation_client/src/api/api.ts b/dictation_client/src/api/api.ts index 34f49ee..265a030 100644 --- a/dictation_client/src/api/api.ts +++ b/dictation_client/src/api/api.ts @@ -1026,6 +1026,19 @@ export interface GetTemplatesResponse { */ 'templates': Array; } +/** + * + * @export + * @interface GetTermsInfoResponse + */ +export interface GetTermsInfoResponse { + /** + * + * @type {Array} + * @memberof GetTermsInfoResponse + */ + 'termsInfo': Array; +} /** * * @export @@ -1816,6 +1829,25 @@ export interface TemplateUploadLocationResponse { */ 'url': string; } +/** + * + * @export + * @interface TermInfo + */ +export interface TermInfo { + /** + * 利用規約種別 + * @type {string} + * @memberof TermInfo + */ + 'documentType': string; + /** + * バージョン + * @type {string} + * @memberof TermInfo + */ + 'version': string; +} /** * * @export @@ -6159,7 +6191,7 @@ export const TermsApiAxiosParamCreator = function (configuration?: Configuration baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -6190,7 +6222,7 @@ export const TermsApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getTermsInfo(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getTermsInfo(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getTermsInfo(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -6210,7 +6242,7 @@ export const TermsApiFactory = function (configuration?: Configuration, basePath * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getTermsInfo(options?: any): AxiosPromise { + getTermsInfo(options?: any): AxiosPromise { return localVarFp.getTermsInfo(options).then((request) => request(axios, basePath)); }, }; diff --git a/dictation_server/src/api/odms/openapi.json b/dictation_server/src/api/odms/openapi.json index 7a56d16..0fd0b8c 100644 --- a/dictation_server/src/api/odms/openapi.json +++ b/dictation_server/src/api/odms/openapi.json @@ -3156,6 +3156,14 @@ } } }, + "400": { + "description": "パラメータ不正エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, "401": { "description": "認証エラー", "content": { @@ -3229,7 +3237,7 @@ } }, "/terms": { - "post": { + "get": { "operationId": "getTermsInfo", "summary": "", "parameters": [], @@ -4561,7 +4569,24 @@ "required": ["pns", "handler"] }, "RegisterResponse": { "type": "object", "properties": {} }, - "GetTermsInfoResponse": { "type": "object", "properties": {} } + "TermInfo": { + "type": "object", + "properties": { + "documentType": { "type": "string", "description": "利用規約種別" }, + "version": { "type": "string", "description": "バージョン" } + }, + "required": ["documentType", "version"] + }, + "GetTermsInfoResponse": { + "type": "object", + "properties": { + "termsInfo": { + "type": "array", + "items": { "$ref": "#/components/schemas/TermInfo" } + } + }, + "required": ["termsInfo"] + } } } } diff --git a/dictation_server/src/features/terms/terms.controller.ts b/dictation_server/src/features/terms/terms.controller.ts index f28d5f8..5155587 100644 --- a/dictation_server/src/features/terms/terms.controller.ts +++ b/dictation_server/src/features/terms/terms.controller.ts @@ -1,4 +1,4 @@ -import { Controller, HttpStatus, Post } from '@nestjs/common'; +import { Controller, HttpStatus, Get } from '@nestjs/common'; import { ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger'; import { TermsService } from '../terms/terms.service'; import { ErrorResponse } from '../../common/error/types/types'; @@ -13,7 +13,7 @@ export class TermsController { private readonly termsService: TermsService, //private readonly cryptoService: CryptoService, ) {} - @Post() + @Get() @ApiResponse({ status: HttpStatus.OK, type: GetTermsInfoResponse, diff --git a/dictation_server/src/features/terms/types/types.ts b/dictation_server/src/features/terms/types/types.ts index e832cc6..afea3f0 100644 --- a/dictation_server/src/features/terms/types/types.ts +++ b/dictation_server/src/features/terms/types/types.ts @@ -1,12 +1,12 @@ import { ApiProperty } from '@nestjs/swagger'; -export class GetTermsInfoResponse { - termsInfo: TermInfo[]; -} - export class TermInfo { @ApiProperty({ description: '利用規約種別' }) documentType: string; @ApiProperty({ description: 'バージョン' }) version: string; } +export class GetTermsInfoResponse { + @ApiProperty({ type: [TermInfo] }) + termsInfo: TermInfo[]; +}