revert CreateAssetDto assetType enum
parent
853f23be19
commit
0a58280f3d
|
|
@ -1076,7 +1076,7 @@ import 'package:openapi/api.dart';
|
|||
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
||||
|
||||
final api_instance = AssetApi();
|
||||
final assetType = assetType_example; // String |
|
||||
final assetType = ; // AssetTypeEnum |
|
||||
final assetData = BINARY_DATA_HERE; // MultipartFile |
|
||||
final deviceAssetId = deviceAssetId_example; // String |
|
||||
final deviceId = deviceId_example; // String |
|
||||
|
|
@ -1100,7 +1100,7 @@ try {
|
|||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**assetType** | **String**| |
|
||||
**assetType** | [**AssetTypeEnum**](AssetTypeEnum.md)| |
|
||||
**assetData** | **MultipartFile**| |
|
||||
**deviceAssetId** | **String**| |
|
||||
**deviceId** | **String**| |
|
||||
|
|
|
|||
|
|
@ -1164,7 +1164,7 @@ class AssetApi {
|
|||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] assetType (required):
|
||||
/// * [AssetTypeEnum] assetType (required):
|
||||
///
|
||||
/// * [MultipartFile] assetData (required):
|
||||
///
|
||||
|
|
@ -1185,7 +1185,7 @@ class AssetApi {
|
|||
/// * [bool] isVisible:
|
||||
///
|
||||
/// * [String] duration:
|
||||
Future<Response> uploadFileWithHttpInfo(String assetType, MultipartFile assetData, String deviceAssetId, String deviceId, String createdAt, String modifiedAt, bool isFavorite, String fileExtension, { MultipartFile? livePhotoData, bool? isVisible, String? duration, }) async {
|
||||
Future<Response> uploadFileWithHttpInfo(AssetTypeEnum assetType, MultipartFile assetData, String deviceAssetId, String deviceId, String createdAt, String modifiedAt, bool isFavorite, String fileExtension, { MultipartFile? livePhotoData, bool? isVisible, String? duration, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final path = r'/asset/upload';
|
||||
|
||||
|
|
@ -1265,7 +1265,7 @@ class AssetApi {
|
|||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] assetType (required):
|
||||
/// * [AssetTypeEnum] assetType (required):
|
||||
///
|
||||
/// * [MultipartFile] assetData (required):
|
||||
///
|
||||
|
|
@ -1286,7 +1286,7 @@ class AssetApi {
|
|||
/// * [bool] isVisible:
|
||||
///
|
||||
/// * [String] duration:
|
||||
Future<AssetFileUploadResponseDto?> uploadFile(String assetType, MultipartFile assetData, String deviceAssetId, String deviceId, String createdAt, String modifiedAt, bool isFavorite, String fileExtension, { MultipartFile? livePhotoData, bool? isVisible, String? duration, }) async {
|
||||
Future<AssetFileUploadResponseDto?> uploadFile(AssetTypeEnum assetType, MultipartFile assetData, String deviceAssetId, String deviceId, String createdAt, String modifiedAt, bool isFavorite, String fileExtension, { MultipartFile? livePhotoData, bool? isVisible, String? duration, }) async {
|
||||
final response = await uploadFileWithHttpInfo(assetType, assetData, deviceAssetId, deviceId, createdAt, modifiedAt, isFavorite, fileExtension, livePhotoData: livePhotoData, isVisible: isVisible, duration: duration, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ void main() {
|
|||
|
||||
//
|
||||
//
|
||||
//Future<AssetFileUploadResponseDto> uploadFile(String assetType, MultipartFile assetData, String deviceAssetId, String deviceId, String createdAt, String modifiedAt, bool isFavorite, String fileExtension, { MultipartFile livePhotoData, bool isVisible, String duration }) async
|
||||
//Future<AssetFileUploadResponseDto> uploadFile(AssetTypeEnum assetType, MultipartFile assetData, String deviceAssetId, String deviceId, String createdAt, String modifiedAt, bool isFavorite, String fileExtension, { MultipartFile livePhotoData, bool isVisible, String duration }) async
|
||||
test('test uploadFile', () async {
|
||||
// TODO
|
||||
});
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ export class CreateAssetDto {
|
|||
|
||||
@IsNotEmpty()
|
||||
@IsEnum(AssetType)
|
||||
@ApiProperty({ enum: Object.values(AssetType) })
|
||||
@ApiProperty({ enumName: 'AssetTypeEnum', enum: AssetType })
|
||||
assetType!: AssetType;
|
||||
|
||||
@IsNotEmpty()
|
||||
|
|
@ -34,6 +34,8 @@ export class CreateAssetDto {
|
|||
@IsOptional()
|
||||
duration?: string;
|
||||
|
||||
// The properties below are added to correctly generate the API docs
|
||||
// and client SDKs. Validation should be handled in the controller.
|
||||
@ApiProperty({ type: 'string', format: 'binary' })
|
||||
assetData!: any;
|
||||
|
||||
|
|
|
|||
|
|
@ -3762,13 +3762,7 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"assetType": {
|
||||
"enum": [
|
||||
"IMAGE",
|
||||
"VIDEO",
|
||||
"AUDIO",
|
||||
"OTHER"
|
||||
],
|
||||
"type": "string"
|
||||
"$ref": "#/components/schemas/AssetTypeEnum"
|
||||
},
|
||||
"assetData": {
|
||||
"type": "string",
|
||||
|
|
|
|||
|
|
@ -4402,7 +4402,7 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration
|
|||
},
|
||||
/**
|
||||
*
|
||||
* @param {string} assetType
|
||||
* @param {AssetTypeEnum} assetType
|
||||
* @param {any} assetData
|
||||
* @param {string} deviceAssetId
|
||||
* @param {string} deviceId
|
||||
|
|
@ -4416,7 +4416,7 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration
|
|||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
uploadFile: async (assetType: string, assetData: any, deviceAssetId: string, deviceId: string, createdAt: string, modifiedAt: string, isFavorite: boolean, fileExtension: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
uploadFile: async (assetType: AssetTypeEnum, assetData: any, deviceAssetId: string, deviceId: string, createdAt: string, modifiedAt: string, isFavorite: boolean, fileExtension: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'assetType' is not null or undefined
|
||||
assertParamExists('uploadFile', 'assetType', assetType)
|
||||
// verify required parameter 'assetData' is not null or undefined
|
||||
|
|
@ -4452,7 +4452,7 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration
|
|||
|
||||
|
||||
if (assetType !== undefined) {
|
||||
localVarFormParams.append('assetType', assetType as any);
|
||||
localVarFormParams.append('assetType', new Blob([JSON.stringify(assetType)], { type: "application/json", }));
|
||||
}
|
||||
|
||||
if (assetData !== undefined) {
|
||||
|
|
@ -4732,7 +4732,7 @@ export const AssetApiFp = function(configuration?: Configuration) {
|
|||
},
|
||||
/**
|
||||
*
|
||||
* @param {string} assetType
|
||||
* @param {AssetTypeEnum} assetType
|
||||
* @param {any} assetData
|
||||
* @param {string} deviceAssetId
|
||||
* @param {string} deviceId
|
||||
|
|
@ -4746,7 +4746,7 @@ export const AssetApiFp = function(configuration?: Configuration) {
|
|||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async uploadFile(assetType: string, assetData: any, deviceAssetId: string, deviceId: string, createdAt: string, modifiedAt: string, isFavorite: boolean, fileExtension: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AssetFileUploadResponseDto>> {
|
||||
async uploadFile(assetType: AssetTypeEnum, assetData: any, deviceAssetId: string, deviceId: string, createdAt: string, modifiedAt: string, isFavorite: boolean, fileExtension: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AssetFileUploadResponseDto>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(assetType, assetData, deviceAssetId, deviceId, createdAt, modifiedAt, isFavorite, fileExtension, livePhotoData, isVisible, duration, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
|
|
@ -4953,7 +4953,7 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath
|
|||
},
|
||||
/**
|
||||
*
|
||||
* @param {string} assetType
|
||||
* @param {AssetTypeEnum} assetType
|
||||
* @param {any} assetData
|
||||
* @param {string} deviceAssetId
|
||||
* @param {string} deviceId
|
||||
|
|
@ -4967,7 +4967,7 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath
|
|||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
uploadFile(assetType: string, assetData: any, deviceAssetId: string, deviceId: string, createdAt: string, modifiedAt: string, isFavorite: boolean, fileExtension: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options?: any): AxiosPromise<AssetFileUploadResponseDto> {
|
||||
uploadFile(assetType: AssetTypeEnum, assetData: any, deviceAssetId: string, deviceId: string, createdAt: string, modifiedAt: string, isFavorite: boolean, fileExtension: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options?: any): AxiosPromise<AssetFileUploadResponseDto> {
|
||||
return localVarFp.uploadFile(assetType, assetData, deviceAssetId, deviceId, createdAt, modifiedAt, isFavorite, fileExtension, livePhotoData, isVisible, duration, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
|
|
@ -5215,7 +5215,7 @@ export class AssetApi extends BaseAPI {
|
|||
|
||||
/**
|
||||
*
|
||||
* @param {string} assetType
|
||||
* @param {AssetTypeEnum} assetType
|
||||
* @param {any} assetData
|
||||
* @param {string} deviceAssetId
|
||||
* @param {string} deviceId
|
||||
|
|
@ -5230,7 +5230,7 @@ export class AssetApi extends BaseAPI {
|
|||
* @throws {RequiredError}
|
||||
* @memberof AssetApi
|
||||
*/
|
||||
public uploadFile(assetType: string, assetData: any, deviceAssetId: string, deviceId: string, createdAt: string, modifiedAt: string, isFavorite: boolean, fileExtension: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options?: AxiosRequestConfig) {
|
||||
public uploadFile(assetType: AssetTypeEnum, assetData: any, deviceAssetId: string, deviceId: string, createdAt: string, modifiedAt: string, isFavorite: boolean, fileExtension: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options?: AxiosRequestConfig) {
|
||||
return AssetApiFp(this.configuration).uploadFile(assetType, assetData, deviceAssetId, deviceId, createdAt, modifiedAt, isFavorite, fileExtension, livePhotoData, isVisible, duration, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue