-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41037 from MikeEdgar/openapi-3.11-builder-api
Bump smallrye-open-api from 3.10.0 to 3.12.0, use new builder API
- Loading branch information
Showing
11 changed files
with
363 additions
and
472 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
39 changes: 39 additions & 0 deletions
39
...eployment/src/main/java/io/quarkus/smallrye/openapi/deployment/MediaTypeConfigSource.java
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,39 @@ | ||
package io.quarkus.smallrye.openapi.deployment; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
import java.util.Set; | ||
|
||
import org.eclipse.microprofile.config.spi.ConfigSource; | ||
|
||
import io.smallrye.openapi.api.SmallRyeOASConfig; | ||
|
||
public class MediaTypeConfigSource implements ConfigSource { | ||
|
||
private final Map<String, String> mediaTypes = new HashMap<>(); | ||
|
||
public MediaTypeConfigSource() { | ||
mediaTypes.put(SmallRyeOASConfig.DEFAULT_PRODUCES_STREAMING, "application/octet-stream"); | ||
mediaTypes.put(SmallRyeOASConfig.DEFAULT_CONSUMES_STREAMING, "application/octet-stream"); | ||
mediaTypes.put(SmallRyeOASConfig.DEFAULT_PRODUCES, "application/json"); | ||
mediaTypes.put(SmallRyeOASConfig.DEFAULT_CONSUMES, "application/json"); | ||
mediaTypes.put(SmallRyeOASConfig.DEFAULT_PRODUCES_PRIMITIVES, "text/plain"); | ||
mediaTypes.put(SmallRyeOASConfig.DEFAULT_CONSUMES_PRIMITIVES, "text/plain"); | ||
} | ||
|
||
@Override | ||
public Set<String> getPropertyNames() { | ||
return mediaTypes.keySet(); | ||
} | ||
|
||
@Override | ||
public String getValue(String propertyName) { | ||
return mediaTypes.get(propertyName); | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return getClass().getSimpleName(); | ||
} | ||
|
||
} |
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
Oops, something went wrong.