-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add @PartFilename config - on/off, value, value suffix (#452)
* Add @PartFilename config - on/off, value, value suffix * Split PartFilenameTest into classic and reactive * Get rid of code duplicity in tests, fix README.md * Revert messed up README.md formatting * Apply suggestions from code review Co-authored-by: Ricardo Zanini <[email protected]> --------- Co-authored-by: Ricardo Zanini <[email protected]>
- Loading branch information
1 parent
72831fb
commit adfa283
Showing
17 changed files
with
719 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>quarkus-openapi-generator-integration-tests</artifactId> | ||
<groupId>io.quarkiverse.openapi.generator</groupId> | ||
<version>3.0.0-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>quarkus-openapi-generator-it-part-filename</artifactId> | ||
<name>Quarkus - Openapi Generator - Integration Tests - PartFilename</name> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>io.quarkiverse.openapi.generator</groupId> | ||
<artifactId>quarkus-openapi-generator</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.resteasy</groupId> | ||
<artifactId>resteasy-multipart-provider</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-resteasy-reactive-common</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-junit5</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-maven-plugin</artifactId> | ||
<extensions>true</extensions> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>build</goal> | ||
<goal>generate-code</goal> | ||
<goal>generate-code-tests</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<profiles> | ||
<profile> | ||
<id>native-image</id> | ||
<activation> | ||
<property> | ||
<name>native</name> | ||
</property> | ||
</activation> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<configuration> | ||
<skipTests>${native.surefire.skip}</skipTests> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-failsafe-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>integration-test</goal> | ||
<goal>verify</goal> | ||
</goals> | ||
<configuration> | ||
<systemPropertyVariables> | ||
<native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path> | ||
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager> | ||
<maven.home>${maven.home}</maven.home> | ||
</systemPropertyVariables> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<properties> | ||
<quarkus.package.type>native</quarkus.package.type> | ||
</properties> | ||
</profile> | ||
</profiles> | ||
</project> |
59 changes: 59 additions & 0 deletions
59
integration-tests/part-filename/src/main/openapi/do-not-generate-part-filename.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
openapi: 3.0.3 | ||
info: | ||
title: "Multipart form data API" | ||
description: An api that uses multipart/form-data as request type | ||
version: 1.0.0 | ||
|
||
servers: | ||
- url: "http://my.endpoint.com/api/v1" | ||
|
||
paths: | ||
/user-profile-data: | ||
post: | ||
tags: | ||
- Do Not Generate Part Filename | ||
description: Upload data for a user profile, adapted from https://swagger.io/docs/specification/describing-request-body/multipart-requests/ | ||
operationId: PostUserProfileData | ||
requestBody: | ||
required: true | ||
description: The data of a user profile | ||
content: | ||
multipart/form-data: | ||
schema: | ||
$ref: "#/components/schemas/UserProfileData" | ||
responses: | ||
"204": | ||
description: "Data uploaded" | ||
"400": | ||
description: "Invalid ID supplied" | ||
|
||
components: | ||
schemas: | ||
Address: | ||
title: Address | ||
type: object | ||
properties: | ||
street: | ||
type: string | ||
description: Street name | ||
example: 7th avenue | ||
city: | ||
type: string | ||
description: Name of the city | ||
example: New Delhi | ||
UserId: | ||
type: string | ||
format: string | ||
ProfileImage: | ||
type: string | ||
format: binary | ||
|
||
UserProfileData: | ||
type: object | ||
properties: # Request parts | ||
id: # Part 1 (string value) | ||
$ref: "#/components/schemas/UserId" | ||
address: # Part2 (object) | ||
$ref: "#/components/schemas/Address" | ||
profileImage: # Part 3 (an image) | ||
$ref: "#/components/schemas/ProfileImage" |
Oops, something went wrong.