springfox / springfox-swagger-ui-rfc6570 Goto Github PK
View Code? Open in Web Editor NEWAlternate swagger-ui web jar which supports the incubating rfc6570 feature
License: Apache License 2.0
Alternate swagger-ui web jar which supports the incubating rfc6570 feature
License: Apache License 2.0
Hi,
Rest call has now problem downloading zip file in browser URL.
With swagger-ui, downloading zip file with extra underscore appended to filename in prefix and suffix (of extension) _XXXApplication-1524222675972.zip_ and its corrupt. Can you please address this issue?
Response header as following:
{
"pragma": "no-cache",
"date": "Fri, 20 Apr 2018 11:11:21 GMT",
"access-control-allow-headers": "Content-Type, attachment",
"content-type": "application/octet-stream",
"access-control-allow-origin": "*",
"cache-control": "no-cache, no-store, must-revalidate",
"content-disposition": "attachment; filename="XXXApplication-1524222675972.zip"",
"attachment": "XXXApplication-1524222675972.zip",
"content-length": "6415",
"expires": "Thu, 01 Jan 1970 00:00:00 GMT"
}
swagger dependencies:
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.8.0</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.8.0</version>
</dependency>
Please let me know if requires more details.
Thanks
I'd like to make a few minor customizations to to the swagger-ui.js that are specific to my application. Is it possible to get this package in a format that I can just add to my /static folder?
This dependency (1.0.0
) works with io.springfox:springfox-swagger2
version 2.7.0
and 2.8.0
, but not with 2.9.0
onwards.
2.9.x
throws the following exception:-
java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[na:1.8.0_171]
at java.lang.Long.parseLong(Long.java:601) ~[na:1.8.0_171]
at java.lang.Long.valueOf(Long.java:803) ~[na:1.8.0_171]
at io.swagger.models.parameters.AbstractSerializableParameter.getExample(AbstractSerializableParameter.java:412) ~[swagger-models-1.5.20.jar:1.5.20]
at sun.reflect.GeneratedMethodAccessor203.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_171]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_171]
at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:664) [jackson-databind-2.8.10.jar:2.8.10]
at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:689) [jackson-databind-2.8.10.jar:2.8.10]
at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:155) [jackson-databind-2.8.10.jar:2.8.10]
at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serializeContents(IndexedListSerializer.java:119) [jackson-databind-2.8.10.jar:2.8.10]
at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serialize(IndexedListSerializer.java:79) [jackson-databind-2.8.10.jar:2.8.10]
at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serialize(IndexedListSerializer.java:18) [jackson-databind-2.8.10.jar:2.8.10]
at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:704) [jackson-databind-2.8.10.jar:2.8.10]
at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:689) [jackson-databind-2.8.10.jar:2.8.10]
at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:155) [jackson-databind-2.8.10.jar:2.8.10]
at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:704) [jackson-databind-2.8.10.jar:2.8.10]
at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:689) [jackson-databind-2.8.10.jar:2.8.10]
at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:155) [jackson-databind-2.8.10.jar:2.8.10]
Link to v2/api-docs shows browser error probably because in response it sends Content-Type: application/xhtml+xml;charset=UTF-8.
With springfox-swagger-ui the link works fine maybe because it sends Content-Type: application/json;charset=UTF-8
Because the empty string is a falsey value in JavaScript and the clientSecret is checked in https://github.com/springfox/springfox-swagger-ui-rfc6570/blob/master/src/web/js/springfox.js#L70, the OAuth configuration is ignored when no clientSecret is provided.
This has already been fixed in https://github.com/springfox/springfox (see springfox/springfox#1592)
In my case the OAuth Provider (Keycloak Server) simply ignores client secrets for non-confidential clients so I can put in a random clientSecret
as a workaround.
I enabledUrlTemplate(ing) in my docket config and switched the UI to this one. The overloaded get methods I have display properly, however the swagger UI looks like it's doubling query parameters after clicking the Execute button;
http://localhost:8080/resources/transforms?name=test&name=test
This succesfully calls the correct Spring controller method but with value "test,test";
@CrossOrigin
@RequestMapping(method = RequestMethod.GET, params = {"name"})
@ResponseBody
public Page<M> findByName(@RequestParam String name, Pageable pageable) {
return repository.findByName(name, pageable, MAX_DEPTH);
}
I've confirmed that a direct call to the url
http://localhost:8080/resources/transforms?name=test
works as intended.
Can you add a feature to have multi line request parameters like the following that presents it as multi line text area?
@ApiParam(value="Message", required=true, multiLine=true)
If there is already one available can you please point me on how to achieve this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.