-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add @PartFilename config - on/off, value, value suffix #452
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
9e55e3c
Add @PartFilename config - on/off, value, value suffix
patr1kt0th c5b53b1
Split PartFilenameTest into classic and reactive
patr1kt0th 68b82b5
Get rid of code duplicity in tests, fix README.md
patr1kt0th ec07c66
Revert messed up README.md formatting
patr1kt0th bcda0fc
Apply suggestions from code review
patr1kt0th File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We declare dependencies that are specific for RESTEasy Reactive or Classic in its equivalent profile in integration-tests/pom.xml. I'm not sure about
resteasy-multipart-provider
, but you can move at leastquarkus-resteasy-reactive-common
to there.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the info, I noticed it, but I did not want to put them there, as they're (only) relevant to the
part-filename
tests and I didn't want to influence the rest of the tests.I need them to be able to compile the tests as they're checking both types of annotations and I couldn't figure out, how to do it in a more elegant way. Or maybe I'm just doing something wrong?
Btw. I think the
quarkus-resteasy-reactive-common
should already be part ofquarkus-rest-client-reactive-jackson
which you already have there.