Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion multiapi-engine/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.sngular</groupId>
<artifactId>multiapi-engine</artifactId>
<version>6.6.0</version>
<version>6.6.1</version>
<packaging>jar</packaging>

<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -493,10 +493,11 @@ private static List<SchemaFieldObject> processArray(
.dataType(SchemaFieldObjectType.fromTypeList(TypeConstants.ARRAY, MapperUtil.getPojoName(fieldName, specFile)))
.build());
} else {
final String itemType = ApiTool.isBinary(items) ? TypeConstants.MULTIPART_FILE : MapperUtil.getSimpleType(items, specFile);
final SchemaFieldObject field = SchemaFieldObject
.builder()
.baseName(fieldName)
.dataType(SchemaFieldObjectType.fromTypeList(TypeConstants.ARRAY, MapperUtil.getSimpleType(items, specFile)))
.dataType(SchemaFieldObjectType.fromTypeList(TypeConstants.ARRAY, itemType))
.build();
fieldObjectArrayList.add(field);
addPropertiesToFieldObject(field, schema);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,11 @@ components:
type: string
format: binary
example: invoice01234.pdf
attachments:
type: array
items:
type: string
format: binary
description:
type: string
example: Invoice for the sale 01234
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

import com.fasterxml.jackson.annotation.JsonProperty;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
import java.util.ArrayList;
import lombok.Builder;
import lombok.Singular;
import lombok.Value;
import lombok.extern.jackson.Jacksonized;

Expand All @@ -12,14 +15,19 @@ public class DocumentDTO {
@JsonProperty(value ="description")
private String description;

@JsonProperty(value ="attachments")
@Singular("attachment")
private List<MultipartFile> attachments;

@JsonProperty(value ="document")
private MultipartFile document;


@Builder
@Jacksonized
private DocumentDTO(String description, MultipartFile document) {
private DocumentDTO(String description, List<MultipartFile> attachments, MultipartFile document) {
this.description = description;
this.attachments = attachments;
this.document = document;

}
Expand Down
6 changes: 3 additions & 3 deletions scs-multiapi-gradle-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ repositories {
}

group = 'com.sngular'
version = '6.6.0'
version = '6.6.1'

def SCSMultiApiPluginGroupId = group
def SCSMultiApiPluginVersion = version
Expand All @@ -31,7 +31,7 @@ dependencies {
shadow localGroovy()
shadow gradleApi()

implementation 'com.sngular:multiapi-engine:6.6.0'
implementation 'com.sngular:multiapi-engine:6.6.1'
testImplementation 'org.assertj:assertj-core:3.24.2'
testImplementation 'com.puppycrawl.tools:checkstyle:10.12.3'
testImplementation 'org.junit.platform:junit-platform-launcher:1.9.2'
Expand Down Expand Up @@ -100,7 +100,7 @@ testing {

integrationTest(JvmTestSuite) {
dependencies {
implementation 'com.sngular:scs-multiapi-gradle-plugin:6.6.0'
implementation 'com.sngular:scs-multiapi-gradle-plugin:6.6.1'
implementation 'org.assertj:assertj-core:3.24.2'
}

Expand Down
4 changes: 2 additions & 2 deletions scs-multiapi-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.sngular</groupId>
<artifactId>scs-multiapi-maven-plugin</artifactId>
<version>6.6.0</version>
<version>6.6.1</version>
<packaging>maven-plugin</packaging>

<name>AsyncApi - OpenApi Code Generator Maven Plugin</name>
Expand Down Expand Up @@ -271,7 +271,7 @@
<dependency>
<groupId>com.sngular</groupId>
<artifactId>multiapi-engine</artifactId>
<version>6.6.0</version>
<version>6.6.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
Expand Down
Loading