I don’t know if springfox supports it, but try setting the tags() attribute in
@Api.
From: on behalf of Chris Russell
Reply-To: "swagger-swaggersocket@googlegroups.com"
Date: Thursday, 23 February 2017 at 16:13
To: Swagger
Subject: Trying to customize the classname
Hello,
Hello,
I'm using springfox (2.6.1) to produce my Swagger output and I have a class
definition:
@RestController
@RequestMapping("/cyberUnit")
@Api(value = "/cyberUnit", description = "Manage Cyber Units")
public class CyberUnitDTOSVCControllerRest extends
AbstractDTOSVCControllerRest {
.
}
Oh, right. Because I could essentially do something like this right now
"/myContext/swagger.json?filter=whatever" and the service in
ApiListingResource will be able to access that filter query param already.
I just have to reference the "filter" param in my filter...wow.
It took a while, but I
You actually shouldn’t need to modify ApiListingResource at all, just create
the filter.
From: on behalf of Bryan Nelson
Reply-To: "swagger-swaggersocket@googlegroups.com"
Date: Thursday, 23 February 2017 at 13:24
To: Swagger
Subject: Re: Dynamic Filtering of APIs
ApiListingRes
>
> ApiListingResource.class is just a JAX-RS endpoint like any of your own.
>
Oh.My.Goodness. I'll risk the egg on my face here and say that I never
realized that! I went on GitHub and looked at ApiListingResource.java and,
although I feel pretty dumb, everything is clear now! My main confu
Your getClasses() method in the Application class tells JAX-RS what to scan
(there are other methods as well).
ApiListingResource.class is just a JAX-RS endpoint like any of your own.
From: on behalf of Bryan Nelson
Reply-To: "swagger-swaggersocket@googlegroups.com"
Date: Thursd
Now this is becoming more clear.
The Application class is the starting point of your JAX-RS app. I
Ok, I understand that.
> It triggers the scanning of your resources
Ok. I got that.
> and exposes them as a rest service.
This is where I'm confused...under what endpoint is it registe
The Application class is the starting point of your JAX-RS app. It triggers the
scanning of your resources and exposes them as a rest service.
All you need to do is create your own Filter (extending AbstratSpecFilter) and
adding it to your beanConfig as you can see in
https://github.com/swagger
I'm not trying to be obtuse, but how is that a web service? Also, I need
it to accept input params (which would be the tags I'd want to dynamically
filter on) and I don't see anyway to make that happen in what I pasted
above?
On Thursday, February 23, 2017 at 3:15:47 PM UTC-5, Ron wrote:
>
> S
So that’s your web service. You just need to add your filter to that.
From: on behalf of Bryan Nelson
Reply-To: "swagger-swaggersocket@googlegroups.com"
Date: Thursday, 23 February 2017 at 12:06
To: Swagger
Subject: Re: Dynamic Filtering of APIs
Ok, here's my setup. I have the
Ok, here's my setup. I have the UI working like mentioned above. I then
have a java class that extends javax.ws.rs.core.Application where I do this:
public class MyApplication extends Application {
public MyApplication() {
BeanConfig beanConfig = new BeanConfig();
beanConfig
Is your swagger.json not generated using swagger-core at runtime?
From: on behalf of Bryan Nelson
Reply-To: "swagger-swaggersocket@googlegroups.com"
Date: Thursday, 23 February 2017 at 11:38
To: Swagger
Subject: Re: Dynamic Filtering of APIs
At the risk of sounding really ignor
At the risk of sounding really ignorant, what do you mean I "already have a
web service"? Right now I have the SwaggerUI pointing to the swagger.json
file from the index.html file as such:
if (url && url.length > 1) {
>
> url = decodeURIComponent(url[1]);
>
> } else {
>
>
I can certainly appreciate the sentiment and generally don't disagree,
however my hands are a bit tied here and I'm wondering if its possible to
do what I asked above.
On Thu, Feb 23, 2017 at 11:23 AM, Ron Ratovsky wrote:
> If the spec doesn’t match the returned object, then shame on the spec
>
You already have a web service, hosting your API and swagger.json. You only
need to write the Filter, configure swagger-core to use it, sit back, and relax.
From: on behalf of Bryan Nelson
Reply-To: "swagger-swaggersocket@googlegroups.com"
Date: Thursday, 23 February 2017 at 11:23
T
Ah. So you're saying that I could create a web service (like I was
thinking in solution #3) that would invoke the ApiAuthorizationFilter using
some passed in parameters that would essentially just give me back a subset
of the overall swagger.json as desired?
If that's the case then does the
If the spec doesn’t match the returned object, then shame on the spec writer or
code writer, whoever came last. The spec is there to document the API.
From: on behalf of Abdullah Mourad
Reply-To: "swagger-swaggersocket@googlegroups.com"
Date: Thursday, 23 February 2017 at 11:20
To: Swa
On a related note... What would one do if the spec did not match the
returned object. Is there any way to map between the two, rather than write
the spec to match the object?
Let's say you have
"definitions": {
"Foo": {
"properties": {
"projectName": {
Hi, thanks for your reply. I created a payload in body with all the required
objects according to their documentation.
I'll be testing the file soon and post back. I sort of figured it out after
posting the question.
Sent from my Samsung Galaxy smartphone.
Original message Fr
No. The filter executed before the swagger.json returns to the consumer and
allows for dynamic filtering of operations and parameters.
From: on behalf of Bryan Nelson
Reply-To: "swagger-swaggersocket@googlegroups.com"
Date: Thursday, 23 February 2017 at 11:14
To: Swagger
Subject: R
I'm not changing them dynamically at runtime. Perhaps I am
misunderstanding when the ApiAuthorizationFilter would get applied? It
seems like this would happen as a "one-time thing" on when the very first
swagger call was made. Is that correct?
On Thursday, February 23, 2017 at 2:10:02 PM UTC
Are you changing your resources dynamically at runtime? If not, I don’t
understand why you need to regenerate the swagger.json.
From: on behalf of Bryan Nelson
Reply-To: "swagger-swaggersocket@googlegroups.com"
Date: Thursday, 23 February 2017 at 11:06
To: Swagger
Subject: Re: Dyna
Hi Ron,
Yes I have. This is the kind of filter I would like to implement in my
solution #3. But my understanding as of now is that the
ApiAuthorizationFilter would only help me if I didn't need to regenerate
the swagger.json on the fly. Is there a way to regenerate the swagger.json
file *wi
Need more info. Not even sure which tool you’re using.
From: on behalf of Fasa Afsfas
Reply-To: "swagger-swaggersocket@googlegroups.com"
Date: Friday, 17 February 2017 at 1:04
To: Swagger
Subject: Swagger editor response example
Hi there, I was wondering, if someone can help me
It’s hard to say without diving into their docs, and I’m afraid I don’t have
time for that right now.
You basically need to define a model for the payload and define it as a body
parameter.
I’d suggest using our online editor for that, take a look at the examples, and
it should be fairly simpl
Hi Brian,
Have you seen our own filtering option in swagger-core?
Take a look at this sample to get an idea -
https://github.com/swagger-api/swagger-samples/blob/master/java/java-jersey2/src/main/java/io/swagger/sample/util/ApiAuthorizationFilterImpl.java.
From: on behalf of Bryan Nel
Greetings,
I've inherited a JAX-RS rest-based Java application that contains roughly
350 operations. I have a need to dynamically generate multiple subset APIs
out of this codebase based upon certain criteria at runtime. For example,
perhaps I want to generate an API that contains all of the
What do you see in your swagger.json?
From: on behalf of
"eat_shoots_and_lea...@1qaz2wsx.co.uk"
Reply-To: "swagger-swaggersocket@googlegroups.com"
Date: Thursday, 23 February 2017 at 1:18
To: Swagger
Subject: Can't get authorization working - No available authorizations
Hi,
I hav
I suggest you try out the http://editor.swagger.io to experiment with the
specification. But here’s how it could be done:
# as a single inline object definition
definitions:
YourResponse:
type: object
properties:
Data:
type: object
properties:
Login:
Hi,
I have this rather simple json response, in my swagger file I want to write
the definition that matches the response.
I got stuck - probably because because I am new to swagger.
so at the end of the example below i want the definition for this json
response
{"Data":{"Login":[{"name":"Doe",
I believe that if you set it to hidden, it should… be hidden
> On Feb 23, 2017, at 3:25 AM, Radu Fabian wrote:
>
> Hello,
>
> I have main resource ConfigurationResource and the subresource
> EnvironmentsResource.
> I am using swagger-io api version 1.5.9 with artifact id swagger-jaxrs.
> The s
Hello,
I have main resource ConfigurationResource and the subresource
EnvironmentsResource.
I am using swagger-io api version 1.5.9 with artifact id swagger-jaxrs.
The swagger is generating tags configuration but without any method inside.
If I remove hidden=true from subresource then is OK. It
Hi,
I have implemented basic auth in my dropwizard service which is working
correctly via a browser or curl.
I have the following swagger definition:
package web.service.config.swagger.definition;
import io.swagger.jaxrs.config.ReaderListener;
import io.swagger.models.Swagger;
import io.swagg
33 matches
Mail list logo