Re: Swagger 2.x and JAX-RS subresources

2018-11-14 Thread Pat S
I would try adding /api, and /doit to the @Path annotations.

Pat

On Friday, October 26, 2018 at 11:17:34 AM UTC-4, franck102 wrote:
>
> Hi all,
>
> I am using the  swagger-maven-plugin version 2.0.5 to generate an OpenApi 
> spec from my JAX-RS Jersey application, and I can't figure out how to deal 
> with subresource classes?
>
> If I do nothing, I end up with the operations being listed twice; if I add 
> @Hidden on the subresource class, the operations are not being generated at 
> all.
>
> The problem can be reproduced with any configuration:
>
> @Path("/rest/service")public class RootResource {
>  @Path("api")
>  public Class getProviderApiResource()
>  {
>return SubResource.class;
>  }
> }
>
>
> public class SubResource {
>  @Path("doit")
>  public void doit()
>  { }
> }
>
>
>
>
>
> ... will generate both /doit and /api/doit.
>
>
> Any suggestion?
>
> Thanks!
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger stub from MySql DB

2018-11-09 Thread Massimo Rosciano
Nobody is following the forum. What a pity!

Il giorno venerdì 2 novembre 2018 15:36:00 UTC+1, Massimo Rosciano ha 
scritto:
>
> Hi,
>I need an information. Is there the possibility to generate swagger 
> json (or yaml) file from a db schema? How can I proceed?
>
> Bye and thanks,
> Massimo.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: swagger tool usage

2018-11-09 Thread divya kakkirala
Hi,Sorry for late response,have u done swagger implementation  project.

On Wed, Oct 10, 2018 at 6:00 PM Ramu Siva  wrote:

> [image: Boxbe]  This message is eligible
> for Automatic Cleanup! (ramusiv...@gmail.com) Add cleanup rule
> 
> | More info
> 
> Hi All,
>
> I am new to swagger develop tool usage.
> Let me know how can i use the swagger tool and create the C++ server and
> client?
> please share if any links for creation of C++ server and client.
>
> Thanks and Regards,
> Ramu Y
>
> --
> You received this message because you are subscribed to the Google Groups
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to swagger-swaggersocket+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [swagger-codegen-maven-plugin] How to generate @FeignClient

2018-10-21 Thread Gerard Bosch
It seems that the answer to my problem is here:

https://github.com/swagger-api/swagger-codegen-generators/pull/193

spring-cloud library was (temporarily) disabled in 3.0.1.

El diumenge, 21 octubre de 2018 17:05:14 UTC+2, Gerard Bosch va escriure:
>
> I tried with this dependency as well: 
> spring-cloud-starter-openfeign
>
>
> El diumenge, 21 octubre de 2018 15:57:02 UTC+2, Gerard Bosch va escriure:
>>
>> Hello,
>>
>> I want to generate the API contract for Spring, this is, I want to 
>> generate only the interface and models for the server so I can bundle it 
>> and distributed as a Maven artifact. I was able to make it using the 
>> `true` option in POM plugin configuration.
>>
>> But I would like to generate the `@FeignClient` interface as well and *here 
>> comes the problem*. If I try to configure it to use the library 
>> `spring-cloud` as I read somewhere I got the following error when I make 
>> `mvn compile`:
>>
>> io.swagger.codegen.v3:swagger-codegen-maven-plugin:3.0.2:gen‌​erate 
>> failed: Unknown library: spring-cloud
>> [ERROR] Available libraries:
>> [ERROR]   spring-boot
>> [ERROR]   spring-mvc
>>
>>
>> Here the piece of plugin configuration I am trying to use:
>>
>> 
>> ...
>> spring
>> spring-cloud
>>
>>
>> I added the `spring-cloud-starter-feign` to my POM as well, in 
>> `` section:
>>
>> 
>> org.springframework.cloud
>> spring-cloud-starter-feign
>> 
>>
>> and the following in ``:
>>
>> 
>> 
>> org.springframework.cloud
>> spring-cloud-dependencies
>> Finchley.SR1
>> pom
>> import
>> 
>> 
>>
>>
>>
>> The version of swagger-codegen-maven-plugin I use is 3.0.2:
>>
>> 
>> io.swagger.codegen.v3
>> swagger-codegen-maven-plugin
>> 3.0.2
>> ...
>>
>>
>>
>> How can I make it to generate contract interface, models, and 
>> @FeignClient for Spring? Is it something missing/wrong in my POM?
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [swagger-codegen-maven-plugin] How to generate @FeignClient

2018-10-21 Thread Gerard Bosch
I tried with this dependency as well: 
spring-cloud-starter-openfeign


El diumenge, 21 octubre de 2018 15:57:02 UTC+2, Gerard Bosch va escriure:
>
> Hello,
>
> I want to generate the API contract for Spring, this is, I want to 
> generate only the interface and models for the server so I can bundle it 
> and distributed as a Maven artifact. I was able to make it using the 
> `true` option in POM plugin configuration.
>
> But I would like to generate the `@FeignClient` interface as well and *here 
> comes the problem*. If I try to configure it to use the library 
> `spring-cloud` as I read somewhere I got the following error when I make 
> `mvn compile`:
>
> io.swagger.codegen.v3:swagger-codegen-maven-plugin:3.0.2:gen‌​erate 
> failed: Unknown library: spring-cloud
> [ERROR] Available libraries:
> [ERROR]   spring-boot
> [ERROR]   spring-mvc
>
>
> Here the piece of plugin configuration I am trying to use:
>
> 
> ...
> spring
> spring-cloud
>
>
> I added the `spring-cloud-starter-feign` to my POM as well, in 
> `` section:
>
> 
> org.springframework.cloud
> spring-cloud-starter-feign
> 
>
> and the following in ``:
>
> 
> 
> org.springframework.cloud
> spring-cloud-dependencies
> Finchley.SR1
> pom
> import
> 
> 
>
>
>
> The version of swagger-codegen-maven-plugin I use is 3.0.2:
>
> 
> io.swagger.codegen.v3
> swagger-codegen-maven-plugin
> 3.0.2
> ...
>
>
>
> How can I make it to generate contract interface, models, and @FeignClient 
> for Spring? Is it something missing/wrong in my POM?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger UI for REST Request body example

2018-10-19 Thread Sharad Goyal
Do you know when it will be implemented?

On Friday, 13 October 2017 09:42:29 UTC-4, Provash Dowari wrote:
>
> Hi,
>
> I have query for example request body rendering in Swagger UI. I am using 
> swagger-jaxrs2-2.0.0-rc2 version for document json generation and 
> swagger-ui-v3.3.1 for UI. Below is my sample code for REST Resource.
>
> Sample Code :
>
> test(@RequestBody(required = true, content = @Content(mediaType = 
> APPLICATION_JSON,schema = @Schema(implementation = Foo.class, example 
> ="fooex1" )
>,examples 
> ={@ExampleObject(name="fooExternalEx1",externalValue="http://localhost:8080/receiver/fooExternalEx1.json;)}))
>  Foo f) {
>   
> }
>
>
> As per Open API spec documentation, UI should replace schema example  with 
> Content example. But UI does not rendering external example. I have seen 
> generated openapi.json has reference to external example.
>
>
> openapi.json snippet:
>
> "requestBody" : {
>   "content" : {
> "application/json" : {
>   "schema" : {
> "$ref" : "#/components/schemas/Foo"
>   },
>   "examples" : {
> "fooExternalEx1" : {
>   "description" : "fooExternalEx1",
>   "externalValue" : 
> "http://localhost:8080/receiver/fooExternalEx1.json;
> }
>   }
> }
>   },
>   "required" : true
> },
>
>
> Please let me know what could be the issue or Do I have to do any other 
> configuration.
>
>
>
> Regards,
>
> Provash
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger API backwards compatibility validator

2018-10-15 Thread trevor.getty via Swagger
Hi, 
there are some compatibility tools which can be used to check compatibility 
on the source or binary output from a build.

You can compare against the last release etc, see this tool 
e.g. http://www.mojohaus.org/clirr-maven-plugin/index.html

I agree it would be great to have a tool which checked for binary 
compatibility breaks in the interface contract alone!  

Something even vb6 compatibility checking allowed you to do, or IDL 
comparison tools.



On Monday, October 8, 2018 at 9:53:49 PM UTC+1, Denes Daniel wrote:
>
> Hey everyone,
>
> I'm looking for a tool that would allow my team to validate that our 
> service API is backwards compatible on each release. Something that we can 
> plug into our release process, that would fail the build / test / deploy if 
> there is a breaking change between the current and the previous 
> "swagger.json" file. We give it two JSON files, and it returns a boolean: 
> compatible or not (exit code 0 or not).
>
> So far the only tool I found with such a feature is Swagger Diff, the Ruby 
> version (https://github.com/civisanalytics/swagger-diff), however, it 
> seems to miss certain breaking changes, and we have no expertise in Ruby to 
> fix any bugs. We're Java-focused, and there is a Java version too (
> https://github.com/Sayi/swagger-diff), but that only generates a list of 
> differences, it doesn't classify them as breaking vs. non-breaking. We may 
> be able to build our own logic around that changelist, but I'd like to 
> avoid reinventing the wheel if possible. Also, these projects don't seem to 
> have a lot of activity (last commits 5+ months ago), not sure whether 
> there's anyone actively maintaining them.
>
> What are others using for this purpose? Is there anything recommended by 
> the Swagger community? Are there any plans for such a tool?
>
> I found a few others looking for the same thing, but no perfect solution 
> yet:
>
> https://stackoverflow.com/questions/28098715/is-there-a-way-to-detect-when-a-swagger-changes
> https://github.com/OAI/OpenAPI-Specification/issues/233
>
> Thanks,
> Denes
>

-- 


* *

**The LIVE DATA Company
*Find out more 
*wandisco.com *



 

*


THIS MESSAGE 
AND ANY ATTACHMENTS ARE CONFIDENTIAL, PROPRIETARY AND MAY BE PRIVILEGED

If 
this message was misdirected, WANdisco, Inc. and its subsidiaries, 
("WANdisco") does not waive any confidentiality or privilege. If you are 
not the intended recipient, please notify us immediately and destroy the 
message without disclosing its contents to anyone. Any distribution, use or 
copying of this email or the information it contains by other than an 
intended recipient is unauthorized. The views and opinions expressed in 
this email message are the author's own and may not reflect the views and 
opinions of WANdisco, unless the author is authorized by WANdisco to 
express such views or opinions on its behalf. All email sent to or from 
this address is subject to electronic storage and review by WANdisco. 
Although WANdisco operates anti-virus programs, it does not accept 
responsibility for any damage whatsoever caused by viruses being passed.

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger API backwards compatibility validator

2018-10-15 Thread trevor.getty via Swagger


On Monday, October 8, 2018 at 9:53:49 PM UTC+1, Denes Daniel wrote:
>
> Hey everyone,
>
> I'm looking for a tool that would allow my team to validate that our 
> service API is backwards compatible on each release. Something that we can 
> plug into our release process, that would fail the build / test / deploy if 
> there is a breaking change between the current and the previous 
> "swagger.json" file. We give it two JSON files, and it returns a boolean: 
> compatible or not (exit code 0 or not).
>
> So far the only tool I found with such a feature is Swagger Diff, the Ruby 
> version (https://github.com/civisanalytics/swagger-diff), however, it 
> seems to miss certain breaking changes, and we have no expertise in Ruby to 
> fix any bugs. We're Java-focused, and there is a Java version too (
> https://github.com/Sayi/swagger-diff), but that only generates a list of 
> differences, it doesn't classify them as breaking vs. non-breaking. We may 
> be able to build our own logic around that changelist, but I'd like to 
> avoid reinventing the wheel if possible. Also, these projects don't seem to 
> have a lot of activity (last commits 5+ months ago), not sure whether 
> there's anyone actively maintaining them.
>
> What are others using for this purpose? Is there anything recommended by 
> the Swagger community? Are there any plans for such a tool?
>
> I found a few others looking for the same thing, but no perfect solution 
> yet:
>
> https://stackoverflow.com/questions/28098715/is-there-a-way-to-detect-when-a-swagger-changes
> https://github.com/OAI/OpenAPI-Specification/issues/233
>
> Thanks,
> Denes
>

-- 


* *

**The LIVE DATA Company
*Find out more 
*wandisco.com *



 

*


THIS MESSAGE 
AND ANY ATTACHMENTS ARE CONFIDENTIAL, PROPRIETARY AND MAY BE PRIVILEGED

If 
this message was misdirected, WANdisco, Inc. and its subsidiaries, 
("WANdisco") does not waive any confidentiality or privilege. If you are 
not the intended recipient, please notify us immediately and destroy the 
message without disclosing its contents to anyone. Any distribution, use or 
copying of this email or the information it contains by other than an 
intended recipient is unauthorized. The views and opinions expressed in 
this email message are the author's own and may not reflect the views and 
opinions of WANdisco, unless the author is authorized by WANdisco to 
express such views or opinions on its behalf. All email sent to or from 
this address is subject to electronic storage and review by WANdisco. 
Although WANdisco operates anti-virus programs, it does not accept 
responsibility for any damage whatsoever caused by viruses being passed.

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: swagger-editor to load yaml by url

2018-10-05 Thread Kurt Ahhh
This is exactly what is wanted !

thank you

Le jeudi 4 octobre 2018 20:21:56 UTC+2, Irfan Pasha a écrit :
>
> Yes, you can. The URL's basically looks like this.
> myapp/doc/api-docs?url=/myapp/doc/candystore.yaml
>
> On Thu, Oct 4, 2018 at 11:25 AM Kurt Ahhh  > wrote:
>
>> Hello,
>>
>> thanks for this excellent tool !
>>
>> With Swagger editor, i would like to load yaml files according to the 
>> url, is it possible ?
>>
>> example: http://localhost/swagger-editor/petstore, would load 
>> petstore.yaml
>> http://localhost/swagger-editor/candystore would load candystore.yaml
>>
>> thanks
>>
>> Kurt
>>
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Swagger" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to swagger-swaggersocket+unsubscr...@googlegroups.com 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> -- 
> irfan..
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: swagger-editor to load yaml by url

2018-10-04 Thread Irfan Pasha
Yes, you can. The URL's basically looks like this.
myapp/doc/api-docs?url=/myapp/doc/candystore.yaml

On Thu, Oct 4, 2018 at 11:25 AM Kurt Ahhh  wrote:

> Hello,
>
> thanks for this excellent tool !
>
> With Swagger editor, i would like to load yaml files according to the url,
> is it possible ?
>
> example: http://localhost/swagger-editor/petstore, would load
> petstore.yaml
> http://localhost/swagger-editor/candystore would load candystore.yaml
>
> thanks
>
> Kurt
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to swagger-swaggersocket+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>


-- 
irfan..

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger editor option

2018-08-01 Thread taly
Thanks for answering the Meta data question.
Can you please update me on my 2 additional questions:
1) Currently we have on the API page, sidebar links. Can we keep them when 
implementing Swagger? 
2) Is there an option to control the API page index status (Indexed for 
Search Engines crawl) and inner links follow/nofollow attributes? Like in 
wordpress or other CMS.

Thanks!

On Monday, July 30, 2018 at 6:34:24 AM UTC+3, Saurabh Goel wrote:
>
> Hi,
>
> We can change Meta details of page by method in SwaggerConfig class as 
> show below,
>
> private ApiInfo apiMetaDetails() {
>  return new ApiInfoBuilder()
> .title("Google API")
> .description("Google API reference for developers")
> .termsOfServiceUrl("http://localhost:8080/;)
> .licenseUrl("he...@gmail.com ")
> .version("1.0")
> .build();
> }
>
> Regards
> Saurabh
>
> On Sunday, July 29, 2018 at 5:17:48 PM UTC+8, ta...@jfrog.com wrote:
>>
>> Hi,
>>
>> Does the swagger platform enables to edit the Meta title & description of 
>> a page, SEO wise? In addition, can I control on other attributes such as 
>> page's indexation, redirects, link follow etc. 
>> 1 more question - our current API page's template has side bar links that 
>> we want to keep when implementing Swagger. Is it possible to have this 
>> template with sidebar links that we define? 
>>
>> Thanks!
>>
>
-- 
 


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger-codegen code generation question

2018-05-10 Thread Ron Ratovsky
No worries, glad you got it sorted out.

 

 

 

From: <swagger-swaggersocket@googlegroups.com> on behalf of Dale Christ 
<dechrist.ph...@gmail.com>
Reply-To: "swagger-swaggersocket@googlegroups.com" 
<swagger-swaggersocket@googlegroups.com>
Date: Wednesday, May 9, 2018 at 19:40
To: Swagger <swagger-swaggersocket@googlegroups.com>
Subject: Re: Swagger-codegen code generation question

 

Ron-- 

 

I found the problem.  I didn't set the security in the correct order.  Once I 
did that, everything is working perfectly.  I hate being a rookie again.  
Thanks for answering.

 

--Dale

 

On Monday, May 7, 2018 at 6:24:22 PM UTC-4, Ron wrote: 

I assume that by “Swagger 2.9.0” you mean Springfox, as there’s no Swagger 
tool, and not with that version.

 

As for the codegen, are you sure you’re using version 1.3.2? That version also 
doesn’t exist for the project.

 

As for authentication, it depends on what your API definition has for those 
operations. You can say that operations require authorization, don’t require 
authorization, or can work either with or without authorization.

 

 

From: <swagger-sw...@googlegroups.com> on behalf of Dale Christ 
<dechris...@gmail.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Monday, May 7, 2018 at 14:12
To: Swagger <swagger-sw...@googlegroups.com>
Subject: Swagger-codegen code generation question

 

Everyone--

 

I'm in the middle of putting together my first service-based project using 
spring-boot 2.0.1 (secured RESTful services), Swagger 2.9.0, using RESTful 
controllers , hal browser, etc.  I'm using  swagger-codegen 1.3.2. to generate 
a client library that I can use in whatever Java client application that I 
choose. 

 

When I generate the client modules, all of the client modules in a given 
service (Users for example need to be all authorized (HttpBasic, ApiKey, or 
OAuth2).  I'd like to have a "validate" operation that will be POSTed,and would 
not use any other form of authentication.  All of my other operations (create, 
retrieve, update, delete) will be authenticated after I validate the user (by 
salty tokens upon validation - unless there is a better idea - and I'm sure 
they're are). 

 

Is there way to generate the code to allow authenticated and non-authenticated 
operations to work in the same service?

 

Thanks for reading.

 

 

--Dale

 

 

 

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger-codegen code generation question

2018-05-09 Thread Dale Christ
Ron--

I found the problem.  I didn't set the security in the correct order.  Once 
I did that, everything is working perfectly.  I hate being a rookie again.  
Thanks for answering.

--Dale

On Monday, May 7, 2018 at 6:24:22 PM UTC-4, Ron wrote:
>
> I assume that by “Swagger 2.9.0” you mean Springfox, as there’s no Swagger 
> tool, and not with that version.
>
>  
>
> As for the codegen, are you sure you’re using version 1.3.2? That version 
> also doesn’t exist for the project.
>
>  
>
> As for authentication, it depends on what your API definition has for 
> those operations. You can say that operations require authorization, don’t 
> require authorization, or can work either with or without authorization.
>
>  
>
>  
>
> *From: * on behalf of Dale 
> Christ 
> *Reply-To: *"swagger-sw...@googlegroups.com " <
> swagger-sw...@googlegroups.com >
> *Date: *Monday, May 7, 2018 at 14:12
> *To: *Swagger 
> *Subject: *Swagger-codegen code generation question
>
>  
>
> Everyone--
>
>  
>
> I'm in the middle of putting together my first service-based project using 
> spring-boot 2.0.1 (secured RESTful services), Swagger 2.9.0, using RESTful 
> controllers , hal browser, etc.  I'm using  swagger-codegen 1.3.2. to 
> generate a client library that I can use in whatever Java client 
> application that I choose. 
>
>  
>
> When I generate the client modules, all of the client modules in a given 
> service (Users for example need to be all authorized (HttpBasic, ApiKey, or 
> OAuth2).  I'd like to have a "validate" operation that will be POSTed,and 
> would not use any other form of authentication.  All of my other operations 
> (create, retrieve, update, delete) will be authenticated after I validate 
> the user (by salty tokens upon validation - unless there is a better idea - 
> and I'm sure they're are). 
>
>  
>
> Is there way to generate the code to allow authenticated and 
> non-authenticated operations to work in the same service?
>
>  
>
> Thanks for reading.
>
>  
>
>  
>
> --Dale
>
>  
>
>  
>
>  
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to swagger-swaggersocket+unsubscr...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger-codegen code generation question

2018-05-07 Thread Dale Christ
Ron--

Yes, I meant springfox-swagger2 (maven artifact), and it's 2.9.0.  And I'm 
using swagger-codegen 2.3.1, and swagger-codegen-maven-plugin 2.3.1.  I'll 
take another look this evening.

--Dale

On Monday, May 7, 2018 at 6:24:22 PM UTC-4, Ron wrote:
>
> I assume that by “Swagger 2.9.0” you mean Springfox, as there’s no Swagger 
> tool, and not with that version.
>
>  
>
> As for the codegen, are you sure you’re using version 1.3.2? That version 
> also doesn’t exist for the project.
>
>  
>
> As for authentication, it depends on what your API definition has for 
> those operations. You can say that operations require authorization, don’t 
> require authorization, or can work either with or without authorization.
>
>  
>
>  
>
> *From: * on behalf of Dale 
> Christ 
> *Reply-To: *"swagger-sw...@googlegroups.com " <
> swagger-sw...@googlegroups.com >
> *Date: *Monday, May 7, 2018 at 14:12
> *To: *Swagger 
> *Subject: *Swagger-codegen code generation question
>
>  
>
> Everyone--
>
>  
>
> I'm in the middle of putting together my first service-based project using 
> spring-boot 2.0.1 (secured RESTful services), Swagger 2.9.0, using RESTful 
> controllers , hal browser, etc.  I'm using  swagger-codegen 1.3.2. to 
> generate a client library that I can use in whatever Java client 
> application that I choose. 
>
>  
>
> When I generate the client modules, all of the client modules in a given 
> service (Users for example need to be all authorized (HttpBasic, ApiKey, or 
> OAuth2).  I'd like to have a "validate" operation that will be POSTed,and 
> would not use any other form of authentication.  All of my other operations 
> (create, retrieve, update, delete) will be authenticated after I validate 
> the user (by salty tokens upon validation - unless there is a better idea - 
> and I'm sure they're are). 
>
>  
>
> Is there way to generate the code to allow authenticated and 
> non-authenticated operations to work in the same service?
>
>  
>
> Thanks for reading.
>
>  
>
>  
>
> --Dale
>
>  
>
>  
>
>  
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to swagger-swaggersocket+unsubscr...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger-codegen code generation question

2018-05-07 Thread Ron Ratovsky
I assume that by “Swagger 2.9.0” you mean Springfox, as there’s no Swagger 
tool, and not with that version.

 

As for the codegen, are you sure you’re using version 1.3.2? That version also 
doesn’t exist for the project.

 

As for authentication, it depends on what your API definition has for those 
operations. You can say that operations require authorization, don’t require 
authorization, or can work either with or without authorization.

 

 

From:  on behalf of Dale Christ 

Reply-To: "swagger-swaggersocket@googlegroups.com" 

Date: Monday, May 7, 2018 at 14:12
To: Swagger 
Subject: Swagger-codegen code generation question

 

Everyone--

 

I'm in the middle of putting together my first service-based project using 
spring-boot 2.0.1 (secured RESTful services), Swagger 2.9.0, using RESTful 
controllers , hal browser, etc.  I'm using  swagger-codegen 1.3.2. to generate 
a client library that I can use in whatever Java client application that I 
choose. 

 

When I generate the client modules, all of the client modules in a given 
service (Users for example need to be all authorized (HttpBasic, ApiKey, or 
OAuth2).  I'd like to have a "validate" operation that will be POSTed,and would 
not use any other form of authentication.  All of my other operations (create, 
retrieve, update, delete) will be authenticated after I validate the user (by 
salty tokens upon validation - unless there is a better idea - and I'm sure 
they're are). 

 

Is there way to generate the code to allow authenticated and non-authenticated 
operations to work in the same service?

 

Thanks for reading.

 

 

--Dale

 

 

 

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger-codegen code generation question

2018-05-07 Thread William Thompson
Dale.  How is your brother, Jesus?

On Mon, May 7, 2018 at 3:12 PM, Dale Christ 
wrote:

> Everyone--
>
> I'm in the middle of putting together my first service-based project using
> spring-boot 2.0.1 (secured RESTful services), Swagger 2.9.0, using RESTful
> controllers , hal browser, etc.  I'm using  swagger-codegen 1.3.2. to
> generate a client library that I can use in whatever Java client
> application that I choose.
>
> When I generate the client modules, all of the client modules in a given
> service (Users for example need to be all authorized (HttpBasic, ApiKey, or
> OAuth2).  I'd like to have a "validate" operation that will be POSTed,and
> would not use any other form of authentication.  All of my other operations
> (create, retrieve, update, delete) will be authenticated after I validate
> the user (by salty tokens upon validation - unless there is a better idea -
> and I'm sure they're are).
>
> Is there way to generate the code to allow authenticated and
> non-authenticated operations to work in the same service?
>
> Thanks for reading.
>
>
> --Dale
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to swagger-swaggersocket+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 

*William "Bill" Thompson *

*(425) 372 8122 <(408)%20406-7968>*

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger and entity framework

2018-05-07 Thread Anders Kjaer Pedersen
Hi 
I found the solution :-)

I changed the get assembly name of the xml file to:

var xmlFile = $"{Assembly.GetAssembly(typeof(Startup)).GetName().Name}.xml";

in stead of 

var xmlFile = $"{Assembly.GetEntryAssembly().GetName().Name}.xml";



Op maandag 7 mei 2018 16:00:37 UTC+2 schreef Anders Kjaer Pedersen:
>
> Hi,
>
> I have implemented the Swagger UI in an Asp.Net core 2.0 API application. 
> It works as expected.
>
> But now I try to add migration - entity framework and I get this errors  
>
> "An error occurred while calling method 'BuildWebHost' on class 'Program'. 
> Continuing without the application service provider. Error: Could not find 
> file 
> 'C:\Users\anders\Source\Repos\Mobility\MobilityWebApi\Mobility.WebApi\bin\Debug\netcoreapp2.0\ef.xml'."
>  
> and "Unable to create an object of type 'MobilityDbContext'. Add an 
> implementation of 'IDesignTimeDbContextFactory' to the 
> project, or see https://go.microsoft.com/fwlink/?linkid=851728 for 
> additional patterns supported at design time."
>
> If comment out this row in the Configure methode:
> app.UseSwagger();
>
> I get the normal behavior from add-migration
>
> Any suggestion?
>
> Anders Pedersen
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger with Swashbuckle version 5 on a Web API

2018-05-01 Thread Ron Ratovsky
Swashbuckle is not one of our libraries, and we don’t know enough about it to 
provide guidance. Would suggest filing a ticket with the project directly.

 

 

From:  on behalf of Ashley Taylor 

Reply-To: "swagger-swaggersocket@googlegroups.com" 

Date: Tuesday, May 1, 2018 at 09:28
To: Swagger 
Subject: Swagger with Swashbuckle version 5 on a Web API

 

Hi,

 

I've configured Swashbuckle version 5.6 for a Web API project using these 
settings:

 

 public class SwaggerConfig

{

public static void Register()

{

if (ConfigUtil.SSOSupported)

{

var thisAssembly = typeof(SwaggerConfig).Assembly;

 

GlobalConfiguration.Configuration

.EnableSwagger(c =>

{

c.Schemes(new[] { "http", "https" });

 

c.SingleApiVersion("v1", "API Adapter");

c.PrettyPrint();

 

c.OAuth2("oauth2")

.Description("Description here")

.Flow("implicit")

.AuthorizationUrl(ConfigUtil.SSOAuthority() + 
"/connect/authorize")

.Scopes(scopes =>

{

scopes.Add("api", "API Scope");

});

 

c.IgnoreObsoleteProperties();

 

c.DescribeAllEnumsAsStrings();

})

.EnableSwaggerUi(c =>

{

c.EnableOAuth2Support("test-client-id", 
"test-realm", "Swagger UI");

});

}

}

}

 

Whilst the UI is loading, it isn't showing the OAuth button to the top right of 
the screen, rather the API Key field is present despite not being configured.

I've traced through the client side code, and whilst it isn't erroring, it is 
falling out at the highlighted line:

 

function initOAuth(e) {

var o = e || {}

  , i = [];

return appName = o.appName || i.push("missing appName"),

popupMask = o.popupMask || $("#api-common-mask"),

popupDialog = o.popupDialog || $(".api-popup-dialog"),

clientId = o.clientId || i.push("missing client id"),

clientSecret = o.clientSecret || null,

realm = o.realm || i.push("missing realm"),

scopeSeparator = o.scopeSeparator || " ",

additionalQueryStringParams = o.additionalQueryStringParams || {},

i.length > 0 ? void log("auth unable initialize oauth: " + i) : ($("pre 
code").each(function(e, o) {

hljs.highlightBlock(o)

}),

$(".api-ic").unbind(),

void $(".api-ic").click(function(e) {

$(e.target).hasClass("ic-off") ? handleLogin() : handleLogout()

}))

}

 

Has anyone seen this before?

>From the articles I've found in this area there were some suggestions of other 
>versions, so i've tried moving back to v5.1.2 and 5.0.0, but the same issue 
>occurs.

 

Any help much appreciated as I've been looking at the same thing for a while 
now!

 

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger 500 error occurs during a request made to invoke swagger docs/v1

2018-05-01 Thread Madhusudhana Rao
Hi All,

Inner Exception details helped us fix the issue, here is the actual issue :

Conflicting schemaIds: Duplicate schemaIds detected for types ..See the 
config setting - \"UseFullTypeNameInSchemaIds\" for a potential workaround.

Thank you all


On Saturday, March 31, 2018 at 4:10:20 PM UTC+5:30, Madhusudhana Rao wrote:
>
> Hi
>
>
> Good Afternoon,
>
>
> Recently for our project we have added XML comments for each API method to 
> get API documentation and execution of request and to receive the response 
> with help of swagger, In this regard after making necessary changes we had 
> an issue and needs urgent assistance to fix the 500 issue . 
>
> Always the application is throwing below issue when we access the url : 
> http://localhost/swagger/docs/v 1
>
>
> Error :
>
>
> *"500 : {"Message":"An unexpected error occurred during processing of the 
> your request"} http://localhost/swagger/docs/v1 
> "*
>
>
>
> *Can anyone provide some assistance to fix this issue ?*
>
>
> We have configured  project properties to generate the XML file into /bin 
> directory by doing the necessary configuration in Build TAB ( by checking 
> the XML documentation file option.) And also the xml file path is 
> configured in *swaggerconfig*.cs file as below .
>
>
> Code File : 
>
>
> public static void Register() { var thisAssembly = 
> typeof(SwaggerConfig).Assembly;
>
> GlobalConfiguration.Configuration 
> .EnableSwagger(c =>
> {
>   c.SingleApiVersion("v1","XML Documentation");
>
>   
> c.IncludeXmlComments(string.Format(@"{0}\bin\projectAPIMethods.XML", 
> System.AppDomain.CurrentDomain.BaseDirectory));
>
>  })
> .EnableSwaggerUi(c =>{ });
>
> }
>
>
> Please let us know whether there is any facility to debug the swagger 
> issue or any assistance to fix this 500 issue ?
>
>
> Thank you 
>
> Madhusudhana T
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger Inspector - Host name

2018-04-16 Thread Shannon Wallace
Thanks for giving us a heads up about this! We have not thought about API 
definitions that don't have a host set - our impression is that most 
companies do eventually hard code a host in their API definition file. 
Otherwise, how would API consumers (even internal ones) know what base URL 
to hit?

For the moment, we don't support this case of no set host well - my 
apologies. We'll think about this in the future, though!

Best Regards,
Shannon Wallace
Product Manager, Swagger



On Friday, April 13, 2018 at 1:57:03 PM UTC-4, ny_shelly wrote:
>
> Hi - Our group is new at using RESTful APIs. We added swashbuckle to our 
> Visual Studio and created a sample API with the json output. We then used 
> Inspector to consume it and we can see all of the API calls listed.
>
> The problem is the host. We did not hard-code a host within the json. This 
> didn't seem to make sense because this can change.
>
> Inspector seems to prompt for a host but when we enter it, Inspector does 
> not add it to the address of the api call. It just seems to get confused.
>
> How do you use Inspector without hard-coding the host?
>
> Thanks,
> Shelly
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger-core Java Add constraints to a List of Strings

2018-04-10 Thread Ron Ratovsky
I don’t know how the gradle plugin works, so I can’t say whether it fully 
depends on springfox or not.

If you experience the issue with springfox solo, I’d start by filing a ticket 
on that project.

 

 

From: <swagger-swaggersocket@googlegroups.com> on behalf of Matt Goodwin 
<matt.goodwin...@gmail.com>
Reply-To: "swagger-swaggersocket@googlegroups.com" 
<swagger-swaggersocket@googlegroups.com>
Date: Tuesday, April 10, 2018 at 12:13
To: Swagger <swagger-swaggersocket@googlegroups.com>
Subject: Re: Swagger-core Java Add constraints to a List of Strings

 

ok so you're suggesting me raising this problem with both Springfox and the 
Swagger gradle plugin as these two projects both experience the same problem?

On Tuesday, 10 April 2018 09:46:34 UTC+1, Ron wrote: 

Which is why you need to address that project.

 

 

 

From: <swagger-sw...@googlegroups.com> on behalf of Matt Goodwin 
<matt.go...@gmail.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Tuesday, April 10, 2018 at 11:45
To: Swagger <swagger-sw...@googlegroups.com>
Subject: Re: Swagger-core Java Add constraints to a List of Strings

 

Ok, well i've also got a project without the Springfox dependency that 
generates the swagger json in a gradle build using the Swagger gradle plugin 
and I have the same problem there too 

On Tuesday, 10 April 2018 09:25:15 UTC+1, Ron wrote: 

If it’s Spring boot, then you have to use Springfox (can’t use swagger-core 
directly).

I don’t know if Springfox parses constraint annotations but it does not depend 
on swagger-core for that business logic.

Would suggest filing a ticket with Springfox.

 

 

 

From: <swagger-sw...@googlegroups.com> on behalf of Matt Goodwin 
<matt.go...@gmail.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Tuesday, April 10, 2018 at 00:16
To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Subject: Re: Swagger-core Java Add constraints to a List of Strings

 

REST framework is Spring boot


On 9 Apr 2018, at 21:51, Ron Ratovsky <r...@swagger.io> wrote:

That doesn’t answer my question though, and there’s a reason I ask.

 

 

 

From: <swagger-sw...@googlegroups.com> on behalf of Matt Goodwin 
<matt.go...@gmail.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Monday, April 9, 2018 at 23:17
To: Swagger <swagger-sw...@googlegroups.com>
Subject: Re: Swagger-core Java Add constraints to a List of Strings

 

i have also used the maven swagger plugin and the gradle swagger plugin to both 
generate the swagger json file and they all return the swagger json without the 
minLength and Pattern on the Items attribute 


On Monday, 9 April 2018 21:05:47 UTC+1, Ron wrote: 

This doesn’t make sense. Either you need to use Springfox or you need to use 
swagger-core, they serve different frameworks. 

Which REST framework do you use?

 

 

 

From: <swagger-sw...@googlegroups.com> on behalf of Matt Goodwin 
<matt.go...@gmail.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Monday, April 9, 2018 at 22:56
To: Swagger <swagger-sw...@googlegroups.com>
Subject: Re: Swagger-core Java Add constraints to a List of Strings

 

ive tried without spring fox and its still the same problem :(

On Monday, 9 April 2018 20:04:47 UTC+1, Ron wrote: 

If you’re using springfox – you need to check with them by filing a ticket 
directly with the project.

 

 

From: <swagger-sw...@googlegroups.com> on behalf of Matt Goodwin 
<matt.go...@gmail.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Monday, April 9, 2018 at 21:40
To: Swagger <swagger-sw...@googlegroups.com>
Subject: Swagger-core Java Add constraints to a List of Strings

 

Hi,  

 

Swagger-core v1.5.18

 

compile 'io.springfox:springfox-swagger2:2.8.0'
compile 'io.swagger:swagger-core:1.5.18'
compile 'io.swagger:swagger-annotations:1.5.18'
compile 'io.swagger:swagger-models:1.5.18'
compile 'io.springfox:springfox-swagger-ui:2.8.0'

 

I want to be able to add constraints to ensure that elements of a List are of a 
certain String length and of a particular pattern such as 

 

My original class is as follows:

 

private class MyRequest {
@Size(max=10)
private List<@Size(max = 10) @Pattern("^myPattern$") String> foo;
}

 

 

However, when checking the generated Swagger JSON, i was expecting... 

 

type: array
items:
  type: string
  minLength: 10
  pattern: ^myPattern$ 
 

but the items array only contained a type property

 

type: array
items:
  type: string
 

Is this possible and if so, how i can achieve this?

-- 
You received this message because you are subscribed to the Google Groups 
"S

Re: Swagger-core Java Add constraints to a List of Strings

2018-04-10 Thread Matt Goodwin
ok so you're suggesting me raising this problem with both Springfox and the 
Swagger gradle plugin as these two projects both experience the same 
problem?

On Tuesday, 10 April 2018 09:46:34 UTC+1, Ron wrote:
>
> Which is why you need to address that project.
>
>  
>
>  
>
>  
>
> *From: *<swagger-sw...@googlegroups.com > on behalf of Matt 
> Goodwin <matt.go...@gmail.com >
> *Reply-To: *"swagger-sw...@googlegroups.com " <
> swagger-sw...@googlegroups.com >
> *Date: *Tuesday, April 10, 2018 at 11:45
> *To: *Swagger <swagger-sw...@googlegroups.com >
> *Subject: *Re: Swagger-core Java Add constraints to a List of Strings
>
>  
>
> Ok, well i've also got a project without the Springfox dependency that 
> generates the swagger json in a gradle build using the Swagger gradle 
> plugin <https://github.com/gigaSproule/swagger-gradle-plugin> and I have 
> the same problem there too 
>
> On Tuesday, 10 April 2018 09:25:15 UTC+1, Ron wrote: 
>
> If it’s Spring boot, then you have to use Springfox (can’t use 
> swagger-core directly).
>
> I don’t know if Springfox parses constraint annotations but it does *not* 
> depend on swagger-core for that business logic.
>
> Would suggest filing a ticket with Springfox.
>
>  
>
>  
>
>  
>
> *From: *<swagger-sw...@googlegroups.com> on behalf of Matt Goodwin <
> matt.go...@gmail.com>
> *Reply-To: *"swagger-sw...@googlegroups.com" <
> swagger-sw...@googlegroups.com>
> *Date: *Tuesday, April 10, 2018 at 00:16
> *To: *"swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
> *Subject: *Re: Swagger-core Java Add constraints to a List of Strings
>
>  
>
> REST framework is Spring boot
>
>
> On 9 Apr 2018, at 21:51, Ron Ratovsky <r...@swagger.io> wrote:
>
> That doesn’t answer my question though, and there’s a reason I ask.
>
>  
>
>  
>
>  
>
> *From: *<swagger-sw...@googlegroups.com> on behalf of Matt Goodwin <
> matt.go...@gmail.com>
> *Reply-To: *"swagger-sw...@googlegroups.com" <
> swagger-sw...@googlegroups.com>
> *Date: *Monday, April 9, 2018 at 23:17
> *To: *Swagger <swagger-sw...@googlegroups.com>
> *Subject: *Re: Swagger-core Java Add constraints to a List of Strings
>
>  
>
> i have also used the maven swagger plugin and the gradle swagger plugin to 
> both generate the swagger json file and they all return the swagger 
> json without the minLength and Pattern on the Items attribute 
>
>
> On Monday, 9 April 2018 21:05:47 UTC+1, Ron wrote: 
>
> This doesn’t make sense. Either you need to use Springfox or you need to 
> use swagger-core, they serve different frameworks. 
>
> Which REST framework do you use?
>
>  
>
>  
>
>  
>
> *From: *<swagger-sw...@googlegroups.com> on behalf of Matt Goodwin <
> matt.go...@gmail.com>
> *Reply-To: *"swagger-sw...@googlegroups.com" <
> swagger-sw...@googlegroups.com>
> *Date: *Monday, April 9, 2018 at 22:56
> *To: *Swagger <swagger-sw...@googlegroups.com>
> *Subject: *Re: Swagger-core Java Add constraints to a List of Strings
>
>  
>
> ive tried without spring fox and its still the same problem :(
>
> On Monday, 9 April 2018 20:04:47 UTC+1, Ron wrote: 
>
> If you’re using springfox – you need to check with them by filing a ticket 
> directly with the project.
>
>  
>
>  
>
> *From: *<swagger-sw...@googlegroups.com> on behalf of Matt Goodwin <
> matt.go...@gmail.com>
> *Reply-To: *"swagger-sw...@googlegroups.com" <swagger-sw...@
> googlegroups.com>
> *Date: *Monday, April 9, 2018 at 21:40
> *To: *Swagger <swagger-sw...@googlegroups.com>
> *Subject: *Swagger-core Java Add constraints to a List of Strings
>
>  
>
> Hi,  
>
>  
>
> Swagger-core v1.5.18
>
>  
>
> compile 'io.springfox:springfox-swagger2:2.8.0'
> compile 'io.swagger:swagger-core:1.5.18'
> compile 'io.swagger:swagger-annotations:1.5.18'
> compile 'io.swagger:swagger-models:1.5.18'
> compile 'io.springfox:springfox-swagger-ui:2.8.0'
>
>  
>
> I want to be able to add constraints to ensure that elements of a List are 
> of a certain String length and of a particular pattern such as 
>
>  
>
> My original class is as follows:
>
>  
>
> private class MyRequest {
> @Size(max=10)
> private List<@Size(max = 10) @Pattern("^myPattern$") String> foo;
> }
>
>  
>
>  
>
> However, when checking the generated Swagger JSON, i was *expecting*... 
>
>  
>
> type: array
>
> items:
>
&

Re: Swagger-core Java Add constraints to a List of Strings

2018-04-10 Thread Ron Ratovsky
Which is why you need to address that project.

 

 

 

From: <swagger-swaggersocket@googlegroups.com> on behalf of Matt Goodwin 
<matt.goodwin...@gmail.com>
Reply-To: "swagger-swaggersocket@googlegroups.com" 
<swagger-swaggersocket@googlegroups.com>
Date: Tuesday, April 10, 2018 at 11:45
To: Swagger <swagger-swaggersocket@googlegroups.com>
Subject: Re: Swagger-core Java Add constraints to a List of Strings

 

Ok, well i've also got a project without the Springfox dependency that 
generates the swagger json in a gradle build using the Swagger gradle plugin 
and I have the same problem there too 

On Tuesday, 10 April 2018 09:25:15 UTC+1, Ron wrote: 

If it’s Spring boot, then you have to use Springfox (can’t use swagger-core 
directly).

I don’t know if Springfox parses constraint annotations but it does not depend 
on swagger-core for that business logic.

Would suggest filing a ticket with Springfox.

 

 

 

From: <swagger-sw...@googlegroups.com> on behalf of Matt Goodwin 
<matt.go...@gmail.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Tuesday, April 10, 2018 at 00:16
To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Subject: Re: Swagger-core Java Add constraints to a List of Strings

 

REST framework is Spring boot


On 9 Apr 2018, at 21:51, Ron Ratovsky <r...@swagger.io> wrote:

That doesn’t answer my question though, and there’s a reason I ask.

 

 

 

From: <swagger-sw...@googlegroups.com> on behalf of Matt Goodwin 
<matt.go...@gmail.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Monday, April 9, 2018 at 23:17
To: Swagger <swagger-sw...@googlegroups.com>
Subject: Re: Swagger-core Java Add constraints to a List of Strings

 

i have also used the maven swagger plugin and the gradle swagger plugin to both 
generate the swagger json file and they all return the swagger json without the 
minLength and Pattern on the Items attribute 


On Monday, 9 April 2018 21:05:47 UTC+1, Ron wrote: 

This doesn’t make sense. Either you need to use Springfox or you need to use 
swagger-core, they serve different frameworks. 

Which REST framework do you use?

 

 

 

From: <swagger-sw...@googlegroups.com> on behalf of Matt Goodwin 
<matt.go...@gmail.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Monday, April 9, 2018 at 22:56
To: Swagger <swagger-sw...@googlegroups.com>
Subject: Re: Swagger-core Java Add constraints to a List of Strings

 

ive tried without spring fox and its still the same problem :(

On Monday, 9 April 2018 20:04:47 UTC+1, Ron wrote: 

If you’re using springfox – you need to check with them by filing a ticket 
directly with the project.

 

 

From: <swagger-sw...@googlegroups.com> on behalf of Matt Goodwin 
<matt.go...@gmail.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Monday, April 9, 2018 at 21:40
To: Swagger <swagger-sw...@googlegroups.com>
Subject: Swagger-core Java Add constraints to a List of Strings

 

Hi,  

 

Swagger-core v1.5.18

 

compile 'io.springfox:springfox-swagger2:2.8.0'
compile 'io.swagger:swagger-core:1.5.18'
compile 'io.swagger:swagger-annotations:1.5.18'
compile 'io.swagger:swagger-models:1.5.18'
compile 'io.springfox:springfox-swagger-ui:2.8.0'

 

I want to be able to add constraints to ensure that elements of a List are of a 
certain String length and of a particular pattern such as 

 

My original class is as follows:

 

private class MyRequest {
@Size(max=10)
private List<@Size(max = 10) @Pattern("^myPattern$") String> foo;
}

 

 

However, when checking the generated Swagger JSON, i was expecting... 

 

type: array
items:
  type: string
  minLength: 10
  pattern: ^myPattern$ 
 

but the items array only contained a type property

 

type: array
items:
  type: string
 

Is this possible and if so, how i can achieve this?

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options,

Re: Swagger-core Java Add constraints to a List of Strings

2018-04-10 Thread Matt Goodwin
Ok, well i've also got a project without the Springfox dependency that 
generates the swagger json in a gradle build using the Swagger gradle plugin 
<https://github.com/gigaSproule/swagger-gradle-plugin> and I have the same 
problem there too 

On Tuesday, 10 April 2018 09:25:15 UTC+1, Ron wrote:
>
> If it’s Spring boot, then you have to use Springfox (can’t use 
> swagger-core directly).
>
> I don’t know if Springfox parses constraint annotations but it does *not* 
> depend on swagger-core for that business logic.
>
> Would suggest filing a ticket with Springfox.
>
>  
>
>  
>
>  
>
> *From: *<swagger-sw...@googlegroups.com > on behalf of Matt 
> Goodwin <matt.go...@gmail.com >
> *Reply-To: *"swagger-sw...@googlegroups.com " <
> swagger-sw...@googlegroups.com >
> *Date: *Tuesday, April 10, 2018 at 00:16
> *To: *"swagger-sw...@googlegroups.com " <
> swagger-sw...@googlegroups.com >
> *Subject: *Re: Swagger-core Java Add constraints to a List of Strings
>
>  
>
> REST framework is Spring boot
>
>
> On 9 Apr 2018, at 21:51, Ron Ratovsky <r...@swagger.io > 
> wrote:
>
> That doesn’t answer my question though, and there’s a reason I ask.
>
>  
>
>  
>
>  
>
> *From: *<swagger-sw...@googlegroups.com > on behalf of Matt 
> Goodwin <matt.go...@gmail.com >
> *Reply-To: *"swagger-sw...@googlegroups.com " <
> swagger-sw...@googlegroups.com >
> *Date: *Monday, April 9, 2018 at 23:17
> *To: *Swagger <swagger-sw...@googlegroups.com >
> *Subject: *Re: Swagger-core Java Add constraints to a List of Strings
>
>  
>
> i have also used the maven swagger plugin and the gradle swagger plugin to 
> both generate the swagger json file and they all return the swagger 
> json without the minLength and Pattern on the Items attribute 
>
>
> On Monday, 9 April 2018 21:05:47 UTC+1, Ron wrote: 
>
> This doesn’t make sense. Either you need to use Springfox or you need to 
> use swagger-core, they serve different frameworks. 
>
> Which REST framework do you use?
>
>  
>
>  
>
>  
>
> *From: *<swagger-sw...@googlegroups.com> on behalf of Matt Goodwin <
> matt.go...@gmail.com>
> *Reply-To: *"swagger-sw...@googlegroups.com" <
> swagger-sw...@googlegroups.com>
> *Date: *Monday, April 9, 2018 at 22:56
> *To: *Swagger <swagger-sw...@googlegroups.com>
> *Subject: *Re: Swagger-core Java Add constraints to a List of Strings
>
>  
>
> ive tried without spring fox and its still the same problem :(
>
> On Monday, 9 April 2018 20:04:47 UTC+1, Ron wrote: 
>
> If you’re using springfox – you need to check with them by filing a ticket 
> directly with the project.
>
>  
>
>  
>
> *From: *<swagger-sw...@googlegroups.com> on behalf of Matt Goodwin <
> matt.go...@gmail.com>
> *Reply-To: *"swagger-sw...@googlegroups.com" <swagger-sw...@
> googlegroups.com>
> *Date: *Monday, April 9, 2018 at 21:40
> *To: *Swagger <swagger-sw...@googlegroups.com>
> *Subject: *Swagger-core Java Add constraints to a List of Strings
>
>  
>
> Hi,  
>
>  
>
> Swagger-core v1.5.18
>
>  
>
> compile 'io.springfox:springfox-swagger2:2.8.0'
> compile 'io.swagger:swagger-core:1.5.18'
> compile 'io.swagger:swagger-annotations:1.5.18'
> compile 'io.swagger:swagger-models:1.5.18'
> compile 'io.springfox:springfox-swagger-ui:2.8.0'
>
>  
>
> I want to be able to add constraints to ensure that elements of a List are 
> of a certain String length and of a particular pattern such as 
>
>  
>
> My original class is as follows:
>
>  
>
> private class MyRequest {
> @Size(max=10)
> private List<@Size(max = 10) @Pattern("^myPattern$") String> foo;
> }
>
>  
>
>  
>
> However, when checking the generated Swagger JSON, i was *expecting*... 
>
>  
>
> type: array
>
> items:
>
>   type: string
>
>   minLength: 10
>
>   pattern: ^myPattern$ 
>
>  
>
> but the items array only contained a type property
>
>  
>
> type: array
>
> items:
>
>   type: string
>
>  
>
> Is this possible and if so, how i can achieve this?
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to swagger-swaggersocket+unsubscr...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>
> -- 
> You received this message because you are subscribed to the Google Group

Re: Swagger-core Java Add constraints to a List of Strings

2018-04-09 Thread Matt Goodwin
REST framework is Spring boot

> On 9 Apr 2018, at 21:51, Ron Ratovsky <r...@swagger.io> wrote:
> 
> That doesn’t answer my question though, and there’s a reason I ask.
>  
>  
>  
> From: <swagger-swaggersocket@googlegroups.com> on behalf of Matt Goodwin 
> <matt.goodwin...@gmail.com>
> Reply-To: "swagger-swaggersocket@googlegroups.com" 
> <swagger-swaggersocket@googlegroups.com>
> Date: Monday, April 9, 2018 at 23:17
> To: Swagger <swagger-swaggersocket@googlegroups.com>
> Subject: Re: Swagger-core Java Add constraints to a List of Strings
>  
> i have also used the maven swagger plugin and the gradle swagger plugin to 
> both generate the swagger json file and they all return the swagger json 
> without the minLength and Pattern on the Items attribute
> 
> On Monday, 9 April 2018 21:05:47 UTC+1, Ron wrote:
> This doesn’t make sense. Either you need to use Springfox or you need to use 
> swagger-core, they serve different frameworks.
> Which REST framework do you use?
>  
>  
>  
> From: <swagger-sw...@googlegroups.com> on behalf of Matt Goodwin 
> <matt.go...@gmail.com>
> Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
> Date: Monday, April 9, 2018 at 22:56
> To: Swagger <swagger-sw...@googlegroups.com>
> Subject: Re: Swagger-core Java Add constraints to a List of Strings
>  
> ive tried without spring fox and its still the same problem :(
> 
> On Monday, 9 April 2018 20:04:47 UTC+1, Ron wrote:
> If you’re using springfox – you need to check with them by filing a ticket 
> directly with the project.
>  
>  
> From: <swagger-sw...@googlegroups.com> on behalf of Matt Goodwin 
> <matt.go...@gmail.com>
> Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
> Date: Monday, April 9, 2018 at 21:40
> To: Swagger <swagger-sw...@googlegroups.com>
> Subject: Swagger-core Java Add constraints to a List of Strings
>  
> Hi, 
>  
> Swagger-core v1.5.18
>  
> compile 'io.springfox:springfox-swagger2:2.8.0'
> compile 'io.swagger:swagger-core:1.5.18'
> compile 'io.swagger:swagger-annotations:1.5.18'
> compile 'io.swagger:swagger-models:1.5.18'
> compile 'io.springfox:springfox-swagger-ui:2.8.0'
>  
> I want to be able to add constraints to ensure that elements of a List are of 
> a certain String length and of a particular pattern such as 
>  
> My original class is as follows:
>  
> private class MyRequest {
> @Size(max=10)
> private List<@Size(max = 10) @Pattern("^myPattern$") String> foo;
> }
>  
>  
> However, when checking the generated Swagger JSON, i was expecting... 
>  
> type: array
> items:
>   type: string
>   minLength: 10
>   pattern: ^myPattern$ 
>  
> but the items array only contained a type property
>  
> type: array
> items:
>   type: string
>  
> Is this possible and if so, how i can achieve this?
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to swagger-swaggersocket+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to swagger-swaggersocket+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to swagger-swaggersocket+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to swagger-swaggersocket+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger-core Java Add constraints to a List of Strings

2018-04-09 Thread Ron Ratovsky
That doesn’t answer my question though, and there’s a reason I ask.

 

 

 

From: <swagger-swaggersocket@googlegroups.com> on behalf of Matt Goodwin 
<matt.goodwin...@gmail.com>
Reply-To: "swagger-swaggersocket@googlegroups.com" 
<swagger-swaggersocket@googlegroups.com>
Date: Monday, April 9, 2018 at 23:17
To: Swagger <swagger-swaggersocket@googlegroups.com>
Subject: Re: Swagger-core Java Add constraints to a List of Strings

 

i have also used the maven swagger plugin and the gradle swagger plugin to both 
generate the swagger json file and they all return the swagger json without the 
minLength and Pattern on the Items attribute 


On Monday, 9 April 2018 21:05:47 UTC+1, Ron wrote: 

This doesn’t make sense. Either you need to use Springfox or you need to use 
swagger-core, they serve different frameworks. 

Which REST framework do you use?

 

 

 

From: <swagger-sw...@googlegroups.com> on behalf of Matt Goodwin 
<matt.go...@gmail.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Monday, April 9, 2018 at 22:56
To: Swagger <swagger-sw...@googlegroups.com>
Subject: Re: Swagger-core Java Add constraints to a List of Strings

 

ive tried without spring fox and its still the same problem :(

On Monday, 9 April 2018 20:04:47 UTC+1, Ron wrote: 

If you’re using springfox – you need to check with them by filing a ticket 
directly with the project.

 

 

From: <swagger-sw...@googlegroups.com> on behalf of Matt Goodwin 
<matt.go...@gmail.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Monday, April 9, 2018 at 21:40
To: Swagger <swagger-sw...@googlegroups.com>
Subject: Swagger-core Java Add constraints to a List of Strings

 

Hi,  

 

Swagger-core v1.5.18

 

compile 'io.springfox:springfox-swagger2:2.8.0'
compile 'io.swagger:swagger-core:1.5.18'
compile 'io.swagger:swagger-annotations:1.5.18'
compile 'io.swagger:swagger-models:1.5.18'
compile 'io.springfox:springfox-swagger-ui:2.8.0'

 

I want to be able to add constraints to ensure that elements of a List are of a 
certain String length and of a particular pattern such as 

 

My original class is as follows:

 

private class MyRequest {
@Size(max=10)
private List<@Size(max = 10) @Pattern("^myPattern$") String> foo;
}

 

 

However, when checking the generated Swagger JSON, i was expecting... 

 

type: array
items:
  type: string
  minLength: 10
  pattern: ^myPattern$ 
 

but the items array only contained a type property

 

type: array
items:
  type: string
 

Is this possible and if so, how i can achieve this?

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger-core Java Add constraints to a List of Strings

2018-04-09 Thread Matt Goodwin
i have also used the maven swagger plugin and the gradle swagger plugin to 
both generate the swagger json file and they all return the swagger 
json without the minLength and Pattern on the Items attribute

On Monday, 9 April 2018 21:05:47 UTC+1, Ron wrote:
>
> This doesn’t make sense. Either you need to use Springfox or you need to 
> use swagger-core, they serve different frameworks. 
>
> Which REST framework do you use?
>
>  
>
>  
>
>  
>
> *From: *<swagger-sw...@googlegroups.com > on behalf of Matt 
> Goodwin <matt.go...@gmail.com >
> *Reply-To: *"swagger-sw...@googlegroups.com " <
> swagger-sw...@googlegroups.com >
> *Date: *Monday, April 9, 2018 at 22:56
> *To: *Swagger <swagger-sw...@googlegroups.com >
> *Subject: *Re: Swagger-core Java Add constraints to a List of Strings
>
>  
>
> ive tried without spring fox and its still the same problem :(
>
> On Monday, 9 April 2018 20:04:47 UTC+1, Ron wrote: 
>
> If you’re using springfox – you need to check with them by filing a ticket 
> directly with the project.
>
>  
>
>  
>
> *From: *<swagger-sw...@googlegroups.com> on behalf of Matt Goodwin <
> matt.go...@gmail.com>
> *Reply-To: *"swagger-sw...@googlegroups.com" <
> swagger-sw...@googlegroups.com>
> *Date: *Monday, April 9, 2018 at 21:40
> *To: *Swagger <swagger-sw...@googlegroups.com>
> *Subject: *Swagger-core Java Add constraints to a List of Strings
>
>  
>
> Hi,  
>
>  
>
> Swagger-core v1.5.18
>
>  
>
> compile 'io.springfox:springfox-swagger2:2.8.0'
> compile 'io.swagger:swagger-core:1.5.18'
> compile 'io.swagger:swagger-annotations:1.5.18'
> compile 'io.swagger:swagger-models:1.5.18'
> compile 'io.springfox:springfox-swagger-ui:2.8.0'
>
>  
>
> I want to be able to add constraints to ensure that elements of a List are 
> of a certain String length and of a particular pattern such as 
>
>  
>
> My original class is as follows:
>
>  
>
> private class MyRequest {
> @Size(max=10)
> private List<@Size(max = 10) @Pattern("^myPattern$") String> foo;
> }
>
>  
>
>  
>
> However, when checking the generated Swagger JSON, i was *expecting*... 
>
>  
>
> type: array
>
> items:
>
>   type: string
>
>   minLength: 10
>
>   pattern: ^myPattern$ 
>
>  
>
> but the items array only contained a type property
>
>  
>
> type: array
>
> items:
>
>   type: string
>
>  
>
> Is this possible and if so, how i can achieve this?
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to swagger-swaggersocket+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to swagger-swaggersocket+unsubscr...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger-core Java Add constraints to a List of Strings

2018-04-09 Thread Ron Ratovsky
This doesn’t make sense. Either you need to use Springfox or you need to use 
swagger-core, they serve different frameworks. 

Which REST framework do you use?

 

 

 

From: <swagger-swaggersocket@googlegroups.com> on behalf of Matt Goodwin 
<matt.goodwin...@gmail.com>
Reply-To: "swagger-swaggersocket@googlegroups.com" 
<swagger-swaggersocket@googlegroups.com>
Date: Monday, April 9, 2018 at 22:56
To: Swagger <swagger-swaggersocket@googlegroups.com>
Subject: Re: Swagger-core Java Add constraints to a List of Strings

 

ive tried without spring fox and its still the same problem :(

On Monday, 9 April 2018 20:04:47 UTC+1, Ron wrote: 

If you’re using springfox – you need to check with them by filing a ticket 
directly with the project.

 

 

From: <swagger-sw...@googlegroups.com> on behalf of Matt Goodwin 
<matt.go...@gmail.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Monday, April 9, 2018 at 21:40
To: Swagger <swagger-sw...@googlegroups.com>
Subject: Swagger-core Java Add constraints to a List of Strings

 

Hi,  

 

Swagger-core v1.5.18

 

compile 'io.springfox:springfox-swagger2:2.8.0'
compile 'io.swagger:swagger-core:1.5.18'
compile 'io.swagger:swagger-annotations:1.5.18'
compile 'io.swagger:swagger-models:1.5.18'
compile 'io.springfox:springfox-swagger-ui:2.8.0'

 

I want to be able to add constraints to ensure that elements of a List are of a 
certain String length and of a particular pattern such as 

 

My original class is as follows:

 

private class MyRequest {
@Size(max=10)
private List<@Size(max = 10) @Pattern("^myPattern$") String> foo;
}

 

 

However, when checking the generated Swagger JSON, i was expecting... 

 

type: array
items:
  type: string
  minLength: 10
  pattern: ^myPattern$ 
 

but the items array only contained a type property

 

type: array
items:
  type: string
 

Is this possible and if so, how i can achieve this?

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger-core Java Add constraints to a List of Strings

2018-04-09 Thread Matt Goodwin
ive tried without spring fox and its still the same problem :(

On Monday, 9 April 2018 20:04:47 UTC+1, Ron wrote:
>
> If you’re using springfox – you need to check with them by filing a ticket 
> directly with the project.
>
>  
>
>  
>
> *From: * on behalf of Matt 
> Goodwin 
> *Reply-To: *"swagger-sw...@googlegroups.com " <
> swagger-sw...@googlegroups.com >
> *Date: *Monday, April 9, 2018 at 21:40
> *To: *Swagger 
> *Subject: *Swagger-core Java Add constraints to a List of Strings
>
>  
>
> Hi,  
>
>  
>
> Swagger-core v1.5.18
>
>  
>
> compile 'io.springfox:springfox-swagger2:2.8.0'
> compile 'io.swagger:swagger-core:1.5.18'
> compile 'io.swagger:swagger-annotations:1.5.18'
> compile 'io.swagger:swagger-models:1.5.18'
> compile 'io.springfox:springfox-swagger-ui:2.8.0'
>
>  
>
> I want to be able to add constraints to ensure that elements of a List are 
> of a certain String length and of a particular pattern such as 
>
>  
>
> My original class is as follows:
>
>  
>
> private class MyRequest {
> @Size(max=10)
> private List<@Size(max = 10) @Pattern("^myPattern$") String> foo;
> }
>
>  
>
>  
>
> However, when checking the generated Swagger JSON, i was *expecting*... 
>
>  
>
> type: array
>
> items:
>
>   type: string
>
>   minLength: 10
>
>   pattern: ^myPattern$ 
>
>  
>
> but the items array only contained a type property
>
>  
>
> type: array
>
> items:
>
>   type: string
>
>  
>
> Is this possible and if so, how i can achieve this?
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to swagger-swaggersocket+unsubscr...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger-core Java Add constraints to a List of Strings

2018-04-09 Thread Ron Ratovsky
If you’re using springfox – you need to check with them by filing a ticket 
directly with the project.

 

 

From:  on behalf of Matt Goodwin 

Reply-To: "swagger-swaggersocket@googlegroups.com" 

Date: Monday, April 9, 2018 at 21:40
To: Swagger 
Subject: Swagger-core Java Add constraints to a List of Strings

 

Hi,  

 

Swagger-core v1.5.18

 

compile 'io.springfox:springfox-swagger2:2.8.0'
compile 'io.swagger:swagger-core:1.5.18'
compile 'io.swagger:swagger-annotations:1.5.18'
compile 'io.swagger:swagger-models:1.5.18'
compile 'io.springfox:springfox-swagger-ui:2.8.0'

 

I want to be able to add constraints to ensure that elements of a List are of a 
certain String length and of a particular pattern such as 

 

My original class is as follows:

 

private class MyRequest {
@Size(max=10)
private List<@Size(max = 10) @Pattern("^myPattern$") String> foo;
}

 

 

However, when checking the generated Swagger JSON, i was expecting... 

 

type: array
items:
  type: string
  minLength: 10
  pattern: ^myPattern$ 
 

but the items array only contained a type property

 

type: array
items:
  type: string
 

Is this possible and if so, how i can achieve this?

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger::Is there any way to document these services/endpoints as they are deployed.

2018-03-29 Thread vikas chandra Gupta
Anybody , Please help..

On Thursday, March 29, 2018 at 9:14:25 AM UTC+5:30, vikas chandra Gupta 
wrote:
>
> Hi All,
>
> Thanks for your help in advance.
>
> Background : I have 40 EJB web applications(war file) running in wildfly . 
> Each of application is having few rest end points. Now i need to setup 
> Swagger to centralize all rest end points written in all apps so that it 
> can be easy to use.
>
> I need Swagger should run as separate application and this swagger 
> automatically read all rest end point of all apps running into Wildfly. I 
> want all the apps listed in Swagger UI so that any body can go through any 
> of them
>
> Your help much appreciated... kindly guide us.. 
> I just looked this URL 
> https://dzone.com/articles/apiee-an-easy-way-to-get-swagger-on-java-ee 
>
> But this is limited to only one webapplication .. 
>
>
> thanks.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: swagger for spring boot + resteasy (via paypal resteasy starter)?

2018-03-27 Thread joachim . peer
ok figured it out

* adding dependencies


io.swagger
swagger-jaxrs
1.5.18



org.webjars
swagger-ui
3.13.0



* in Jaxrs startup app, instantiate BeanConfig in constructor and override:


public Set getClasses() {

HashSet set = new HashSet();
set.add(io.swagger.jaxrs.listing.ApiListingResource.class);
set.add(io.swagger.jaxrs.listing.SwaggerSerializers.class);
return set;
}


and the UI part is just a question of serving static files defined in 
swagger-ui webjar to browser (in my case i wrote a jax-rs resource for that)


On Saturday, March 24, 2018 at 4:20:44 PM UTC+1, joachi...@gmail.com wrote:
>
> does anybody have a hint or link to tutorial on  this?
> thanks!
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: “Swagger + Servlet + jboss” does not listed the defined REST APIs

2018-03-15 Thread 2sbsbsb
Strange that no replies for these request Not an active group :(

On Friday, June 16, 2017 at 11:20:06 AM UTC-7, dgm wrote:
>
> Hi
>
> As discussed earlier (http://swagger.io/irc/), I am having as issue 
> related to “Swagger + Servlet + jboss” does not listed my APIs. It’s only 
> display {"apiVersion":"1.0.0","swaggerVersion":"1.2"}. whenever I am using 
> swagger-servlet_2.10-1.3.13 but whenever I change it to 
> swagger-servlet_1.5.13, nothing is returned by swagger doc API. 
>
> Please note that, I am using the same given 
> https://github.com/swagger-api/swagger-samples/tree/master/java/java-servlet 
> ith some little veriation. 
>
>
>
> My pom
>
>  
> io.swagger
> 
> swagger-servlet
> 1.5.13
> 
> 
> ch.qos.logback
> 
> logback-classic
> 1.0.1
> 
> 
> javax.servlet
> servlet-api
> 2.3
> 
> 
> io.swagger
> swagger-core
> 1.5.13
> 
> 
> io.swagger
> swagger-models
> 1.5.13
> 
> 
> org.apache.commons
> commons-lang3
> 3.4
> 
>
> My web.xml
> http://java.sun.com/xml/ns/javaee……;>
>
> 
> 
> DefaultServletConfig
> 
> io.swagger.servlet.config.DefaultServletConfig
> 
> swagger.resource.package
> com.topo.rest.resource
> 
> 
> swagger.api.basepath
> https://localhost:8443/api/topo/v1
> 
> 
> api.version
> 1.0.0
> 
> 2
> 
>
> 
> 
> ApiDeclarationServlet
> 
> io.swagger.servlet.listing.ApiDeclarationServlet
> 
> 
> ApiDeclarationServlet
> /api-doc/*
> 
> 
>
>
> Please note that, I am deploying it in jboss 7 server with 
> /api/topo/v1
>
>
> The servlet, 
>
> package com.topo.rest.resource;
>
> import javax.servlet.annotation.WebServlet;
> import javax.servlet.http.HttpServlet;
> import javax.servlet.http.HttpServletRequest;
> import javax.servlet.http.HttpServletResponse;
> import java.io.IOException;
>
> import io.swagger.annotations.Api;
> import io.swagger.annotations.ApiImplicitParam;
> import io.swagger.annotations.ApiImplicitParams;
> import io.swagger.annotations.ApiOperation;
>
> @Api(value = "/test/", description = "gets some data from a servlet")
> @WebServlet(urlPatterns = {"/*"})
> public class TopoResourceServlet extends HttpServlet {
>
> public TopoResourceServlet() {
> super();
> }
>
> private static final long serialVersionUID = 1L;
>
> @ApiOperation(httpMethod = "GET", value = "Resource to get a user")
> @ApiImplicitParams({
> @ApiImplicitParam(name = "name", value = "User's name", 
> required = true, dataType = "string", paramType = "query"),
> @ApiImplicitParam(name = "email", value = "User's email", 
> required = true, dataType = "string", paramType = "query"),
> })
> @Override
> public void doGet(HttpServletRequest request, HttpServletResponse 
> response) {
> response.setStatus(HttpServletResponse.SC_OK);
> try {
> response.getWriter().println("Servlet Response");
> } catch (IOException e) {
> e.printStackTrace();
> }
> }
> }
>
> But, whenever I access the api-docs, using
>   HttpResponse responseGet = get ("
> https://localhost:8443/api/topo/v1/api-docs;); 
> I am getting the REST response only ("Servlet Response") not the API doc.
>
>
>
> Interstingly, for older swagger-servlet_2.10-1.3.13.jar (and related 
> dependency), I am getting the following
>
> {"apiVersion":"1.0.0","swaggerVersion":"1.2"}.
>
> without my rest API. 
>
>
> Any help will be appreciated.
>
> Regards
>
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger-ui for multiple resources

2018-03-06 Thread Ron Ratovsky
Swagger-ui renders a the API definition as it receives it. Theoretically, if 
you’d want to have an individual instance per resource, you’d need to have a 
separate file for each.

 

That said, you can check out the `filter` parameter of swagger-ui, more details 
at 
https://github.com/swagger-api/swagger-ui/blob/master/docs/usage/configuration.md.
 This may answer your needs.

 

 

From:  on behalf of Ryan Brown 

Reply-To: "swagger-swaggersocket@googlegroups.com" 

Date: Tuesday, March 6, 2018 at 16:19
To: Swagger 
Subject: Swagger-ui for multiple resources

 

Hi everyone. I'm putting together a swagger-ui route for an api that has 18 
resources. I would like to have a parent swagger-ui for the entire API 
(http://my.api.com/swagger-ui.html) and individual ones for each resource. Is 
it considered good practice is such cases to hand the swagger-ui off of each 
resource in this case? say like http://my.api.com/users/swagger-ui.html and  
http://my.api.com/orders/swagger-ui.html ? For some reson I am not quite sure 
how to handle this as I have always just had a parent route that exposed all of 
the resources in the API. However, we have a requirement to expose individual 
resources with a swagger-iu endpoint as well. Any guidance is great appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger syntax checker/HTML doc generator

2018-03-02 Thread Heather Gulledge
Found part of my answer.  

 //syntax check the specification
//SwaggerDeserializationResult res = new 
SwaggerParser().readWithInfo(out.toString());  // supports swagger 2
SwaggerParseResult res = new OpenAPIV3Parser().readContents(out.toString(), 
null, null);  //supports openapi3 and requires swagger-parser 2.0
//System.out.println(res.getMessages().toString());
System.out.println(res.getMessages().size() + " Errors");
for (String msg : res.getMessages()) {
System.out.println(msg);
}

On Friday, March 2, 2018 at 10:40:24 AM UTC-6, Heather Gulledge wrote:
>
> I'm looking for a way to validate that a swagger/openapi3 interface 
> specification is syntactically correct.  What I am wanting to do is have a 
> pre-commit git hook script that ensures any interface checked into our 
> repository is clean.  Java or python would be preferable.  I know I can do 
> this interactively with swagger ui, but I'm looking for a way to do it as a 
> background process. If it fails I would like to be able to capture the 
> errors to kick back to the submitter.  If it passes I would ideally like to 
> generate the html documentation similar to what swagger ui creates so that 
> can be put in the repository and pushed out to where it is hosted.  
>
> I see lots of efforts to validate incoming json payloads against a swagger 
> specification, but that is not what I'm looking for here.
>
> Any suggestions would be appreciated.
>
> Heather
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger syntax checker/HTML doc generator

2018-03-02 Thread Ron Ratovsky
You can take a look at the validator-badge project – you can call it as a 
service.

 

 

 

From:  on behalf of Heather Gulledge 

Reply-To: "swagger-swaggersocket@googlegroups.com" 

Date: Friday, March 2, 2018 at 09:40
To: Swagger 
Subject: Swagger syntax checker/HTML doc generator

 

I'm looking for a way to validate that a swagger/openapi3 interface 
specification is syntactically correct.  What I am wanting to do is have a 
pre-commit git hook script that ensures any interface checked into our 
repository is clean.  Java or python would be preferable.  I know I can do this 
interactively with swagger ui, but I'm looking for a way to do it as a 
background process. If it fails I would like to be able to capture the errors 
to kick back to the submitter.  If it passes I would ideally like to generate 
the html documentation similar to what swagger ui creates so that can be put in 
the repository and pushed out to where it is hosted.   

 

I see lots of efforts to validate incoming json payloads against a swagger 
specification, but that is not what I'm looking for here.

 

Any suggestions would be appreciated.

 

Heather

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger generates generic "date-time" format for java.time.LocalDateTime

2018-03-01 Thread Ron Ratovsky
Sure, you can file a ticket with the project ☺

 

 

 

From:  on behalf of Robert 

Reply-To: "swagger-swaggersocket@googlegroups.com" 

Date: Thursday, March 1, 2018 at 09:39
To: Swagger 
Subject: Swagger generates generic "date-time" format for 
java.time.LocalDateTime

 

Hi there, 

 

I noticed that Swagger generates a generic "date-time" format for 
java.time.LocalDateTime. I see in the data types documentation that points to 
RFC3339, section 5.6 that date-time includes a time offset, but LocalDateTime 
purposely does not. This has caused some confusion with users of our API, who 
converted their datetime to UTC and sent a zero offset when we were expecting 
the original datetime.

 

Is there anything we can do to mitigate this issue?

 

Best,

 

Robert

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger for SOAP service

2018-02-22 Thread KARTHIK PRABHU N
Is there any alternate solution i could give a try.

Thanks Ron.

Regards,Karthik

On Thursday, February 22, 2018 at 9:39:22 PM UTC+5:30, Ron wrote:
>
> It does not.
>
>  
>
>  
>
>  
>
> *From: * on behalf of 
> KARTHIK PRABHU N 
> *Reply-To: *"swagger-sw...@googlegroups.com " <
> swagger-sw...@googlegroups.com >
> *Date: *Thursday, February 22, 2018 at 09:06
> *To: *Swagger 
> *Subject: *Swagger for SOAP service
>
>  
>
> Hello Team, 
>
>  
>
> Does swagger support for SOAP service.Let us know how we could do this?
>
>  
>
> Note: We dont want to convert existing soap service into REST then design 
> swagger Specification.
>
>  
>
> Thanks,
>
> Karthik
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to swagger-swaggersocket+unsubscr...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger for SOAP service

2018-02-22 Thread Ron Ratovsky
It does not.

 

 

 

From:  on behalf of KARTHIK PRABHU N 

Reply-To: "swagger-swaggersocket@googlegroups.com" 

Date: Thursday, February 22, 2018 at 09:06
To: Swagger 
Subject: Swagger for SOAP service

 

Hello Team, 

 

Does swagger support for SOAP service.Let us know how we could do this?

 

Note: We dont want to convert existing soap service into REST then design 
swagger Specification.

 

Thanks,

Karthik

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger v2: Security requirement interpretation: AND vs OR

2018-02-15 Thread Ron Ratovsky
Yup, it’d be a logical AND.

 

 

 

From:  on behalf of Willem Salembier 

Reply-To: "swagger-swaggersocket@googlegroups.com" 

Date: Thursday, February 15, 2018 at 02:00
To: Swagger 
Subject: Swagger v2: Security requirement interpretation: AND vs OR

 

I'm currently in a discussion with a product vendor on the correct 
interpretation of the security requirement element in Swagger v2. 

 

What's the correct interpretation of this security requirement defined 
globally? 

 

 

"security": [{"petstore_auth": ["write:pets","read:pets"]}]

 

 

"petstore_auth" is of type oauth2. According to the specification, I would say 
both scopes are required (logical AND) to invoke any resources in the API.

 

https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#securityRequirementObject

If the security scheme is of type "oauth2", then the value is a list of scope 
names required for the execution. For other security scheme types, the array 
MUST be empty.

 

"list of scope names required for the execution" is to be interpreted as *all* 
scopes required for the execution, correct?

 

 

Imagine, we would globally like to define that any of the scopes are required 
(we can always refine the scopes on resource level). I suppose the correct 
configuration in that case must be:

 

 

"security": [{"petstore_auth": ["write:pets"
]},{
"petstore_auth": ["read:pets"
]}
]



This is what I understand from the specification of "security": A declaration 
of which security schemes are applied for the API as a whole. The list of 
values describes alternative security schemes that can be used (that is, there 
is a logical OR between the security requirements). Individual operations can 
override this definition.





Thanks for your clarifications

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: SWAGGER EDITOR ONLINE DOESNT WORK

2018-02-13 Thread Ron Ratovsky
It’s fixed now. Please be aware that we provide the editor and codegen online 
as a free service with no SLA guarantees.

If you depend on it, and are pressed for time, you can always run any of the 
tools locally and get the same result.

 

 

 

From: <swagger-swaggersocket@googlegroups.com> on behalf of John Glisson 
<john.glis...@gmail.com>
Reply-To: "swagger-swaggersocket@googlegroups.com" 
<swagger-swaggersocket@googlegroups.com>
Date: Tuesday, February 13, 2018 at 07:27
To: Swagger <swagger-swaggersocket@googlegroups.com>
Subject: Re: SWAGGER EDITOR ONLINE DOESNT WORK

 

Following...I see the same when trying to generate server code, just using the 
Swagger Petstore sample. 

 



On Tuesday, February 13, 2018 at 8:13:12 AM UTC-5, Esteban moya wrote: 

Someone knows why it does not work. When i do click in download client, not 
appear nothing. I need a code client urgent.

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: SWAGGER EDITOR ONLINE DOESNT WORK

2018-02-13 Thread John Glisson
Following...I see the same when trying to generate server code, just using 
the Swagger Petstore sample.




On Tuesday, February 13, 2018 at 8:13:12 AM UTC-5, Esteban moya wrote:
>
> Someone knows why it does not work. When i do click in download client, 
> not appear nothing. I need a code client urgent.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: swagger 3: schema for map of maps

2018-02-12 Thread Ron Ratovsky
Yes.

 

 

 

From:  on behalf of 
"arindam.choudh...@ackstorm.com" 
Reply-To: "swagger-swaggersocket@googlegroups.com" 

Date: Tuesday, February 6, 2018 at 05:50
To: Swagger 
Subject: swagger 3: schema for map of maps

 

I want to model a schema where the json is map of maps:

 
{
  'id1': {
    'type': 'type1',
    'active': true,
  }, 
  'id2': {
    'type': 'type2',
    'active': false,
  },
  ... 
  ... 
}
 

 

I have defined:

 
components:
  schemas:
    accountData:
  type: object
  required:
    - type
    - active
  properties:
    type:
  type: string
    active:
  type: boolean
 
    accounts:
  type: object
  additionalProperties:
    $ref: '#/components/schemas/accountData'
 

Is it correct?

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger Editor Validation Error- "pattern" should match format "regex"

2018-02-12 Thread Ron Ratovsky
Which version of the editor do you use? I checked with the online one and I’m 
getting no such validation error.

 

 

 

From:  on behalf of 
"galynamudry...@gmail.com" 
Reply-To: "swagger-swaggersocket@googlegroups.com" 

Date: Friday, February 9, 2018 at 08:33
To: Swagger 
Subject: Swagger Editor Validation Error- "pattern" should match format "regex"

 

Hello,

When i check my swagger code in a swagger editor I always receive the same 
validation error: 

 
Schema error at definitions ... .pattern
should match format "regex"
format: regex 
Structure of my object:

Object:

type: object

title: 

required:

  - wheel

  - window

properties:

  wheel:

type: string

title: Wheel

description: Wheel

pattern: '^\d{3}-\d{2}-\d{4}$'

example: Wheel

  window:

type: string

title: Window

description: Window

pattern: '^\d{3}-\d{2}-\d{4}$'

example: Window

 


Could you help me please to resolve this problem?


P.S. I'm using swagger 2.0

Regards, Galyna

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger js codegen on how to generate models

2018-02-09 Thread vijay kumar
Hi Ramya,

My requirement is for node.js to generate stubs .I have generated Stubs
using swagger-js-codegen and code works fine .It just that iam not able to
generate models object from swagger.

I am looking at different library but nothing has helped so far.

Thank you
Vijay

On Fri, Feb 9, 2018 at 6:09 PM, Ramya kadimetla 
wrote:

> Hi Vijay,
>
> I am using swagger-ant-task.0.0.2 jar for generating swagger.json file for
> ant project.
>
> Thanks & Regards,
> Ramya
>
> On Thu, Feb 8, 2018 at 10:47 PM, vijay kumar 
> wrote:
>
>> Hi Ramya,
>>
>> Sorry about the late reply.
>>
>> Like swagger.json i am not sure can help me help understand how to
>> generate the .json files. Are you using swagger-js-codgen or any other tool.
>>
>> Thank you
>> Vijay
>>
>> On Tue, Feb 6, 2018 at 10:37 AM, Ramya kadimetla <
>> kadimetla.ra...@gmail.com> wrote:
>>
>>> Hi Vijay,
>>>
>>> I am sorry, I haven't used swagger codegen.
>>> Even I am new to swagger, since two weeks, I am working on swagger and I
>>> was able to generate swagger.json for ant project.
>>>
>>> Thanks & Regards,
>>> Ramya
>>>
>>> On Fri, Feb 2, 2018 at 10:27 AM, vijay kumar 
>>> wrote:
>>>
 Hi ,

 I am using *swagger js codegen* to generate source code in *nodejs*
 .it works superb.

 However i have question ,

 If we use *swagger codegen* and use *java* lang , models and handlers
 gets generated as part of stubs generation but in swagger js codegen it
 does not generate any models.

 can you please guide me if we can generate models in swagger js codegen
 .This will actually help when there is an change in api it will
 automatically generate the models without we manually changing.

 Kindly suggest if any other approach is available for nodejs.

 Thank you
 Vijay


 --
 You received this message because you are subscribed to the Google
 Groups "Swagger" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to swagger-swaggersocket+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

>>>
>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Swagger" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>>> pic/swagger-swaggersocket/s3dLDEF-Ho8/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> swagger-swaggersocket+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>>  Kool Vj
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Swagger" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to swagger-swaggersocket+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Swagger" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/swagger-swaggersocket/s3dLDEF-Ho8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> swagger-swaggersocket+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
 Kool Vj

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger js codegen on how to generate models

2018-02-09 Thread Ramya kadimetla
Hi Vijay,

I am using swagger-ant-task.0.0.2 jar for generating swagger.json file for
ant project.

Thanks & Regards,
Ramya

On Thu, Feb 8, 2018 at 10:47 PM, vijay kumar 
wrote:

> Hi Ramya,
>
> Sorry about the late reply.
>
> Like swagger.json i am not sure can help me help understand how to
> generate the .json files. Are you using swagger-js-codgen or any other tool.
>
> Thank you
> Vijay
>
> On Tue, Feb 6, 2018 at 10:37 AM, Ramya kadimetla <
> kadimetla.ra...@gmail.com> wrote:
>
>> Hi Vijay,
>>
>> I am sorry, I haven't used swagger codegen.
>> Even I am new to swagger, since two weeks, I am working on swagger and I
>> was able to generate swagger.json for ant project.
>>
>> Thanks & Regards,
>> Ramya
>>
>> On Fri, Feb 2, 2018 at 10:27 AM, vijay kumar 
>> wrote:
>>
>>> Hi ,
>>>
>>> I am using *swagger js codegen* to generate source code in *nodejs* .it
>>> works superb.
>>>
>>> However i have question ,
>>>
>>> If we use *swagger codegen* and use *java* lang , models and handlers
>>> gets generated as part of stubs generation but in swagger js codegen it
>>> does not generate any models.
>>>
>>> can you please guide me if we can generate models in swagger js codegen
>>> .This will actually help when there is an change in api it will
>>> automatically generate the models without we manually changing.
>>>
>>> Kindly suggest if any other approach is available for nodejs.
>>>
>>> Thank you
>>> Vijay
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Swagger" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to swagger-swaggersocket+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Swagger" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>> pic/swagger-swaggersocket/s3dLDEF-Ho8/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> swagger-swaggersocket+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
>  Kool Vj
>
> --
> You received this message because you are subscribed to the Google Groups
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to swagger-swaggersocket+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger js codegen on how to generate models

2018-02-08 Thread vijay kumar
Hi Ramya,

Sorry about the late reply.

Like swagger.json i am not sure can help me help understand how to generate
the .json files. Are you using swagger-js-codgen or any other tool.

Thank you
Vijay

On Tue, Feb 6, 2018 at 10:37 AM, Ramya kadimetla 
wrote:

> Hi Vijay,
>
> I am sorry, I haven't used swagger codegen.
> Even I am new to swagger, since two weeks, I am working on swagger and I
> was able to generate swagger.json for ant project.
>
> Thanks & Regards,
> Ramya
>
> On Fri, Feb 2, 2018 at 10:27 AM, vijay kumar 
> wrote:
>
>> Hi ,
>>
>> I am using *swagger js codegen* to generate source code in *nodejs* .it
>> works superb.
>>
>> However i have question ,
>>
>> If we use *swagger codegen* and use *java* lang , models and handlers
>> gets generated as part of stubs generation but in swagger js codegen it
>> does not generate any models.
>>
>> can you please guide me if we can generate models in swagger js codegen
>> .This will actually help when there is an change in api it will
>> automatically generate the models without we manually changing.
>>
>> Kindly suggest if any other approach is available for nodejs.
>>
>> Thank you
>> Vijay
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Swagger" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to swagger-swaggersocket+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Swagger" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/swagger-swaggersocket/s3dLDEF-Ho8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> swagger-swaggersocket+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
 Kool Vj

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger js codegen on how to generate models

2018-02-05 Thread Ramya kadimetla
Hi Vijay,

I am sorry, I haven't used swagger codegen.
Even I am new to swagger, since two weeks, I am working on swagger and I
was able to generate swagger.json for ant project.

Thanks & Regards,
Ramya

On Fri, Feb 2, 2018 at 10:27 AM, vijay kumar 
wrote:

> Hi ,
>
> I am using *swagger js codegen* to generate source code in *nodejs* .it
> works superb.
>
> However i have question ,
>
> If we use *swagger codegen* and use *java* lang , models and handlers
> gets generated as part of stubs generation but in swagger js codegen it
> does not generate any models.
>
> can you please guide me if we can generate models in swagger js codegen
> .This will actually help when there is an change in api it will
> automatically generate the models without we manually changing.
>
> Kindly suggest if any other approach is available for nodejs.
>
> Thank you
> Vijay
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to swagger-swaggersocket+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger ANT Task generating empty JSON

2018-02-01 Thread Ramya
Also, can you share the  jars that you have in SwaggerAntLib.

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger ANT Task generating empty JSON

2018-01-31 Thread Ramya
Does your java file import
  import com.wordnik.swagger.annotations.Api;
  or 
  import io.swagger.annotations.Api;

It will work with import com.wordnik.swagger.annotations.Api;.

Can you share me the template file you are using. For me, it is generating 
the json file but in different format.

On Monday, 19 June 2017 09:37:42 UTC+5:30, Thammaiah Manadamada wrote:
>
> Hi All,
>
> I have used swagger-ant-task 0.0.2 version in my project i have added 
> task to my ant file as shown below
>
>  value="C:/Users/tmb/Documents/NetBeansProjects/LIBRARY" />  id="swagger.classpath">   name="lib/tools.jar"/>name="*/**"/>name="*/**"/>description="Define the swagger task.">  classname="com.github.cstroe.swagger.docgen.SwaggerTask" 
> classpathref="swagger.classpath"/>   name="swaggertask.first" description="A typical swagger task definition." 
> depends="swaggertask.init">
> com.thammaiah.swager.resource 
> http,https www.example.com:8080 
> /api  Swagger Maven Plugin Sample 
> v1 This is a sample for 
> swagger-maven-plugin 
> http://www.github.com/kongchen/swagger-maven-plugin 
>  http://www.apache.org/licenses/LICENSE-2.0.html 
> Apache 2.0
> ${basedir} 
> true  
> description="All tests." depends="swaggertask.first"/>
>
> I have created a netbeans web project to do the same.My resource classes 
> are under src/java/com/thammaiah/swagger/resource. However when i run the 
> target to generate swagger it is generating a swagger which do not have api 
> details.
> That is it is not able to find the resource with @Api annotation.
>
> JSON Generated
>
> {
>   "swagger" : "2.0",
>   "info" : {
> "description" : "This is a sample for swagger-maven-plugin",
> "version" : "v1",
> "title" : "Swagger Maven Plugin Sample",
> "termsOfService" : "
> http://www.github.com/kongchen/swagger-maven-plugin;,
> "license" : {
>   "name" : "Apache 2.0",
>   "url" : "http://www.apache.org/licenses/LICENSE-2.0.html;
> }
>   },
>   "host" : "www.example.com:8080",
>   "basePath" : "/api",
>   "schemes" : [ "http", "https" ]
> } 
>
> NOTE: I have tried maven plugin it creates a proper expected JSON. But 
> could not achieve using ant.
>
> Please let me know if i am missing something. 
>
> Regards,
> Thammaiah
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger UI merges examples when using allOf schema composition. Can I disable this?

2018-01-30 Thread David . Biesack
I submitted https://github.com/swagger-api/swagger-ui/issues/4175

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: swagger 2.0.0 snapshot jars

2017-12-16 Thread PJ Fanning
Thanks Ron. I raised https://github.com/swagger-api/swagger-core/issues/2589

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: swagger 2.0.0 snapshot jars

2017-12-15 Thread Ron Ratovsky
Odd, this should happen automatically. Mind filing a ticket on the project and 
we’ll take a look? I’ll push a snapshot now manually.

 

 

From:  on behalf of PJ Fanning 

Reply-To: "swagger-swaggersocket@googlegroups.com" 

Date: Friday, December 15, 2017 at 12:19
To: Swagger 
Subject: swagger 2.0.0 snapshot jars

 

Hi, 

Does anyone know if there up to date swagger 2.0 branch snapshot jars published 
to a maven repo?

https://oss.sonatype.org/content/repositories/snapshots/io/swagger/swagger-core/
 has jars from October but there have been some changes since that I would like 
to test.

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger generation issue for request body with polymorphic field (Java)

2017-12-15 Thread niraj . patel
(Both class A and B in my example extend SomeInterface)

On Friday, December 15, 2017 at 3:49:24 PM UTC-6, niraj...@data.world wrote:
>
> *Problem*
> In Java, whenever swagger.json is generated for the *Request* object the 
> field definition is a reference to *SomeInterface* instead of a OneOf 
> definition pointing to class *A* or *B*.
>
> *Classes*
> public class Request {
> private SomeInterface field;
> }
>
> @JsonTypeInfo(use = JsonTypeInfo.Id.NAME,
> include = JsonTypeInfo.As.PROPERTY,
> property = "format",
> visible = true)
> @JsonSubTypes({
> @JsonSubTypes.Type(value = A.class, name = "A"),
> @JsonSubTypes.Type(value = B.class, name = "B")})
> @ApiModel
> public interface SomeInterface {
> Format getFormat();
> }
>
> public class A {
> ...
> }
>
> public class B {
> ...
> }
>
> Are there any Java annotations to properly generate a OneOf definition for 
> *Request*?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger UI & PDF endpoints

2017-12-12 Thread Ron Ratovsky
It’d be hard to tell without seeing the API definition. Please file a ticket 
with Swagger-UI with the details requested in the template.

 

 

 

From:  on behalf of Nicholas W 

Reply-To: "swagger-swaggersocket@googlegroups.com" 

Date: Tuesday, December 12, 2017 at 14:24
To: Swagger 
Subject: Swagger UI & PDF endpoints

 

AspNetCore 2.0.1 (WebAPI project)
Using Swashbuckle.AspNetCore 1.1.0
Chrome v 63.0.3239.84
We have a controller endpoint that looks like this:

 

[HttpGet("{id:Guid}")]
public async Task Get(Guid id)
{
   try
   {
   var docBytes = await _service.GeneratePdfAsync(id).ConfigureAwait(false);

   if (docBytes == null) return NotFound();

   return File(docBytes, "application/pdf", FileName);
}
catch (Exception e)
{
   return StatusCode(500, GenerationErrorMessage);
}
}

 

The test I've been running against this endpoint should return a 3 page PDF 
with content and images.

 

I am able to download the file SwaggerUI provides via link after a successful 
response from the API. When I view the downloaded PDF in a browser (Chrome), 
none of the images display correctly (I get black boxes), and there's an empty 
4th page. When I view the downloaded PDF in Adobe Touch, it's 4 blank pages.

 

If I hit the same endpoint using Postman, it gives me the PDF to download, and 
the PDF looks as it should. We also have a console app that hits the API and 
saves the PDF to disk, which also looks fine.

 

Is there a known issue with SwaggerUI downloading PDFs in this manner? Am I 
missing some attribute on the endpoint that would give Swagger more specific 
into to properly download the file?

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger for Dummies

2017-12-07 Thread Ron Ratovsky
An API is a general term to describe the way for computer software (though 
could be hardware) components to communicate with each other, whether they live 
on the same machine or remotely (such as client/server applications).

 

OpenAPI is a specification used to describe APIs that are based on HTTP, which 
today drive the majority of applications. The OpenAPI used to be known as 
Swagger.

 

Swagger, today, is a set of tools that take an API definition in the OpenAPI 
format, and allow you to do various things with it, including documentation, 
testing, code generation and more.

 

 

 

 

From:  on behalf of Laurie Anderson 
<7au...@gmail.com>
Reply-To: "swagger-swaggersocket@googlegroups.com" 

Date: Thursday, December 7, 2017 at 13:51
To: Swagger 
Subject: Swagger for Dummies

 

If a person is computer literate, but programmer illiterate, how would one 
describe Swagger and what exactly is an API? An advise and information accepted 
(unless you're only giving rude comments.) Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger UI is authorized (access token received) but does not send it as header in HTTP requests

2017-12-07 Thread Nicolae Marasoiu
Fixed, adding scopes both on client configuration and on the endpoints, and 
they match, the token is being sent.
Moreover, probably unrelated, for my case i needed scopes=openid, profile 
to do openid connect flow.

On Thursday, December 7, 2017 at 1:47:06 PM UTC+2, Nicolae Marasoiu wrote:
>
> Hi,
> I attached the swagger.json. Please advise.
> The Swagger UI does receive the token in the redirect callback uri, but it 
> does not seem to send it (I would expect a header set with it, probably the 
> Authorization header, but there isn't any).
> I am not sure what the specific endpoints need to be configured with. I 
> did set the "authorizations" field as visible in the attached swagger.json, 
> but perhaps more needs to be written there. Please help,
> Thanks,
> nicu marasoiu
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger Editor external reference local file vrs. remote

2017-12-05 Thread Gregg Fiehler
Thanks Ron, I set the CORS config and now it works.  I thought CORS did not 
fetch the document if it did not get the proper CORS response so I did not 
look for that.  I really appreciate your time and patience.

Cheers
Gregg

>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger Editor external reference local file vrs. remote

2017-12-05 Thread Ron Ratovsky
Thanks, that worked.

 

It looks like it’s a CORS issue. If you check the console, you’ll see something 
like this:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the 
remote resource at https://s3.amazonaws.com/st-swagger-docs/testschema.json. 
(Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

 

Now, yes, the file is being fetched, but it’s not processed because of it.

 

 

 

From: <swagger-swaggersocket@googlegroups.com> on behalf of Gregg Fiehler 
<gregg.fieh...@gmail.com>
Reply-To: "swagger-swaggersocket@googlegroups.com" 
<swagger-swaggersocket@googlegroups.com>
Date: Tuesday, December 5, 2017 at 09:02
To: Swagger <swagger-swaggersocket@googlegroups.com>
Subject: Re: Swagger Editor external reference local file vrs. remote

 

try this  

 

https://s3.amazonaws.com/st-swagger-docs/testschema.json#/definitions/PostalAddress
 

 

I had a typo in the URL I sent before, but that is not what is in my swagger 
document so I am unsure how I messed that up.

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger Editor external reference local file vrs. remote

2017-12-05 Thread Gregg Fiehler
try this 

https://s3.amazonaws.com/st-swagger-docs/testschema.json#/definitions/PostalAddress

I had a typo in the URL I sent before, but that is not what is in my 
swagger document so I am unsure how I messed that up.

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger Editor external reference local file vrs. remote

2017-12-05 Thread Ron Ratovsky
I’m afraid it still doesn’t work for me…

 

 

 

From: <swagger-swaggersocket@googlegroups.com> on behalf of Gregg Fiehler 
<gregg.fieh...@gmail.com>
Reply-To: "swagger-swaggersocket@googlegroups.com" 
<swagger-swaggersocket@googlegroups.com>
Date: Tuesday, December 5, 2017 at 08:14
To: Swagger <swagger-swaggersocket@googlegroups.com>
Subject: Re: Swagger Editor external reference local file vrs. remote

 

Hi Ron, I do apologize, I had set it up on Friday to give public read only 
access and someone changed it back over the weekend.  I just fixed it so it 
should work now.  Again sorry for the inconvenience. 

 

Gregg

On Monday, December 4, 2017 at 4:18:44 PM UTC-7, Ron wrote: 

I still can’t access those…

 

 

 

From: <swagger-sw...@googlegroups.com> on behalf of Gregg Fiehler 
<gregg@gmail.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Friday, December 1, 2017 at 14:54
To: Swagger <swagger-sw...@googlegroups.com>
Subject: Re: Swagger Editor external reference local file vrs. remote

 

ok I switched the file out to something I can share and gave public access

both 
$ref: 
'https://s3.amazonaws.com/st-swagger-docs/testschema.json/testschema.json#/definitions/PostalAddress'
$ref: 
'https://s3.amazonaws.com/st-swagger-docs/testschema.json/testschema.json#/definitions/PostalAddress'

fail with same error as before, but both work if I just cut and paste into 
browser

 $ref: 'http://localhost:8080/testschema.json#/definitions/PostalAddress'

the local ref still works fine.

On Friday, December 1, 2017 at 2:03:46 PM UTC-7, Ron wrote: 

That would make it difficult for me to figure out what’s wrong…

 

 

 

From: <swagger-sw...@googlegroups.com> on behalf of Gregg Fiehler 
<gregg@gmail.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Friday, December 1, 2017 at 12:37
To: Swagger <swagger-sw...@googlegroups.com>
Subject: Re: Swagger Editor external reference local file vrs. remote

 

BTW their is a restriction on the S3 URL to only allow it to work inside our 
firewall so you would not be able to access it for a test.

On Friday, December 1, 2017 at 1:17:07 PM UTC-7, Gregg Fiehler wrote: 

I don't think that is the issue, the network monitor in the browser shows the 
call returned the data with a 200 response code and the response is identical 
to when I use the local file.  Also I can just cut/paste the url in the $ref in 
the browser and get the document.

On Friday, December 1, 2017 at 12:58:37 PM UTC-7, Ron wrote: 

It looks like the access to the file hosted on S3 is restricted, so the editor 
can’t read it. You’d need to enable anonymous access to it.

 

 

 

From: <swagger-sw...@googlegroups.com> on behalf of Gregg Fiehler 
<gregg@gmail.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Friday, December 1, 2017 at 11:13
To: Swagger <swagger-sw...@googlegroups.com>
Subject: Re: Swagger Editor external reference local file vrs. remote

 

Ok I installed the latest and then had to change the local file ref to 

$ref: 
'http://localhost:8080/ReservationEventDefinitions.json#/definitions/PostalAddress'

now that works, but the remote still does not
Errors
Resolver error at paths./products.get.responses.200.schema.items.$ref
Could not resolve reference because of: NetworkError when attempting to fetch 
resource. 

 


but the network traffic still shows it as a 200



On Friday, December 1, 2017 at 11:29:57 AM UTC-7, Ron wrote: 

Hi Gregg,

 

That’s an old version of the editor which we don’t support anymore.

Please try the latest version.

 

 

 

From: <swagger-sw...@googlegroups.com> on behalf of Gregg Fiehler 
<gregg@gmail.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Friday, December 1, 2017 at 09:44
To: Swagger <swagger-sw...@googlegroups.com>
Subject: Swagger Editor external reference local file vrs. remote

 

I have swagger editor running locally.  With Ron's help I got a local file for 
an external reference to work

fragment of swagger doc:
responses:
200:
  description: An array of products
  schema:
type: array
items:
  $ref: 
'ReservationEventDefinitions.json#/definitions/PostalAddress'


I then put the same file in Amazon S3 and I cannot get it to work

  i only updated the $ref line to

$ref: 
'https://s3.amazonaws.com/st-swagger-docs/ReservationEventDefinitions.json#/definitions/PostalAddress'

and I get 
Swagger Error 
Reference could not be resolved: 
https://s3.amazonaws.com/st-swagger-docs/ReservationEventDefinitions.json#/definitions/PostalAddress

 

however when I look at the network traffic, both calls work. I have attached 
the screen print of the editor with the erro

Re: Swagger Editor external reference local file vrs. remote

2017-12-05 Thread Gregg Fiehler
Hi Ron, I do apologize, I had set it up on Friday to give public read only 
access and someone changed it back over the weekend.  I just fixed it so it 
should work now.  Again sorry for the inconvenience.

Gregg

On Monday, December 4, 2017 at 4:18:44 PM UTC-7, Ron wrote:
>
> I still can’t access those…
>
>  
>
>  
>
>  
>
> *From: *<swagger-sw...@googlegroups.com > on behalf of Gregg 
> Fiehler <gregg@gmail.com >
> *Reply-To: *"swagger-sw...@googlegroups.com " <
> swagger-sw...@googlegroups.com >
> *Date: *Friday, December 1, 2017 at 14:54
> *To: *Swagger <swagger-sw...@googlegroups.com >
> *Subject: *Re: Swagger Editor external reference local file vrs. remote
>
>  
>
> ok I switched the file out to something I can share and gave public access
>
> both 
> $ref: 
> 'https://s3.amazonaws.com/st-swagger-docs/testschema.json/testschema.json#/definitions/PostalAddress'
> $ref: 
> 'https://s3.amazonaws.com/st-swagger-docs/testschema.json/testschema.json#/definitions/PostalAddress'
>
> fail with same error as before, but both work if I just cut and paste into 
> browser
>
>  $ref: 'http://localhost:8080/testschema.json#/definitions/PostalAddress'
>
> the local ref still works fine.
>
> On Friday, December 1, 2017 at 2:03:46 PM UTC-7, Ron wrote: 
>
> That would make it difficult for me to figure out what’s wrong…
>
>  
>
>  
>
>  
>
> *From: *<swagger-sw...@googlegroups.com> on behalf of Gregg Fiehler <
> gregg@gmail.com>
> *Reply-To: *"swagger-sw...@googlegroups.com" <
> swagger-sw...@googlegroups.com>
> *Date: *Friday, December 1, 2017 at 12:37
> *To: *Swagger <swagger-sw...@googlegroups.com>
> *Subject: *Re: Swagger Editor external reference local file vrs. remote
>
>  
>
> BTW their is a restriction on the S3 URL to only allow it to work inside 
> our firewall so you would not be able to access it for a test.
>
> On Friday, December 1, 2017 at 1:17:07 PM UTC-7, Gregg Fiehler wrote: 
>
> I don't think that is the issue, the network monitor in the browser shows 
> the call returned the data with a 200 response code and the response is 
> identical to when I use the local file.  Also I can just cut/paste the url 
> in the $ref in the browser and get the document.
>
> On Friday, December 1, 2017 at 12:58:37 PM UTC-7, Ron wrote: 
>
> It looks like the access to the file hosted on S3 is restricted, so the 
> editor can’t read it. You’d need to enable anonymous access to it.
>
>  
>
>  
>
>  
>
> *From: *<swagger-sw...@googlegroups.com> on behalf of Gregg Fiehler <
> gregg@gmail.com>
> *Reply-To: *"swagger-sw...@googlegroups.com" <
> swagger-sw...@googlegroups.com>
> *Date: *Friday, December 1, 2017 at 11:13
> *To: *Swagger <swagger-sw...@googlegroups.com>
> *Subject: *Re: Swagger Editor external reference local file vrs. remote
>
>  
>
> Ok I installed the latest and then had to change the local file ref to 
>
> $ref: '
> http://localhost:8080/ReservationEventDefinitions.json#/definitions/PostalAddress
> '
>
> now that works, but the remote still does not
> ErrorsResolver error at 
> paths./products.get.responses.200.schema.items.$ref
>
> Could not resolve reference because of: NetworkError when attempting to 
> fetch resource. 
>
>  
>
>
> but the network traffic still shows it as a 200
>
>
> [image: 
> https://lh6.googleusercontent.com/proxy/v6quYz_GlKwMhelsUIJF370-hFCrxpSlqufPHFg69K2EXSRv7u4WNbl8v4wVKOtzLFK88gV6GiBCYyCIelqaI1o7_N_V5SGiYhfQVwunGhzTje40MqmvzuFE5nCn8V7wYJV9mGbdj41-4bXTYEuIffGSFuGRpNCYhUsW3NQ3=w5000-h5000]
> On Friday, December 1, 2017 at 11:29:57 AM UTC-7, Ron wrote: 
>
> Hi Gregg,
>
>  
>
> That’s an old version of the editor which we don’t support anymore.
>
> Please try the latest version.
>
>  
>
>  
>
>  
>
> *From: *<swagger-sw...@googlegroups.com> on behalf of Gregg Fiehler <
> gregg@gmail.com>
> *Reply-To: *"swagger-sw...@googlegroups.com" <
> swagger-sw...@googlegroups.com>
> *Date: *Friday, December 1, 2017 at 09:44
> *To: *Swagger <swagger-sw...@googlegroups.com>
> *Subject: *Swagger Editor external reference local file vrs. remote
>
>  
>
> I have swagger editor running locally.  With Ron's help I got a local file 
> for an external reference to work
>
> fragment of swagger doc:
> responses:
> 200:
>   description: An array of products
>   schema:
> type: array
> items:
>   $ref: 
> 'ReservationEventDefinitions.json#/definitions/PostalAddress'
>

Re: swagger-ui-bundle.js returned from memory cache on chrome, file length incorrect

2017-12-05 Thread Nicolae Marasoiu
I know I can evict my browser caches, but I am more interested in solving 
this for the other developers and future users and avoid this scenario 
where the js library upgrade does not propagate to the browser. Thanks in 
advance for your tips

On Tuesday, December 5, 2017 at 10:53:47 AM UTC+2, Nicolae Marasoiu wrote:
>
> Hi,
> In my understanding how caching is supposed to work, the browser should 
> send a request to the server for the javascript file, mentioning in that 
> request what version of the file it has, in terms of timestamp, file 
> length, etag, media types and/or other ways. The server will respond with 
> either "ok, your version is ok, you can use the cached version", or "no, 
> here is the actual content of that file". In this case I am not sure if 
> chrome sends a request to the server (I could try a proxy to check this 
> indeed, or activate logs on the server side), and it just seems that it 
> takes from its own cache.
> Please help,
> Thank you,
> Nicu Marasoiu
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: swagger-ui-bundle.js returned from memory cache on chrome, file length incorrect

2017-12-05 Thread Nicolae Marasoiu
When I to a GET on http://localhost:9898/cache/swagger/swagger-ui-bundle.js 
I get the actual version of the file (having the initOAuth method), but in 
chrome Inspect I see that the request is marked as 200 OK (from memory 
cache) and old data about it is there including its old length and its old 
contents.

On Tuesday, December 5, 2017 at 10:53:47 AM UTC+2, Nicolae Marasoiu wrote:
>
> Hi,
> In my understanding how caching is supposed to work, the browser should 
> send a request to the server for the javascript file, mentioning in that 
> request what version of the file it has, in terms of timestamp, file 
> length, etag, media types and/or other ways. The server will respond with 
> either "ok, your version is ok, you can use the cached version", or "no, 
> here is the actual content of that file". In this case I am not sure if 
> chrome sends a request to the server (I could try a proxy to check this 
> indeed, or activate logs on the server side), and it just seems that it 
> takes from its own cache.
> Please help,
> Thank you,
> Nicu Marasoiu
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: swagger-ui-bundle.js returned from memory cache on chrome, file length incorrect

2017-12-05 Thread Nicolae Marasoiu
Sorry, I made a manual request to the server for the js file and indeed the 
server returns the old version, thank you

On Tuesday, December 5, 2017 at 10:53:47 AM UTC+2, Nicolae Marasoiu wrote:
>
> Hi,
> In my understanding how caching is supposed to work, the browser should 
> send a request to the server for the javascript file, mentioning in that 
> request what version of the file it has, in terms of timestamp, file 
> length, etag, media types and/or other ways. The server will respond with 
> either "ok, your version is ok, you can use the cached version", or "no, 
> here is the actual content of that file". In this case I am not sure if 
> chrome sends a request to the server (I could try a proxy to check this 
> indeed, or activate logs on the server side), and it just seems that it 
> takes from its own cache.
> Please help,
> Thank you,
> Nicu Marasoiu
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger Editor external reference local file vrs. remote

2017-12-01 Thread Gregg Fiehler
ok I switched the file out to something I can share and gave public access

both 
$ref: 
'https://s3.amazonaws.com/st-swagger-docs/testschema.json/testschema.json#/definitions/PostalAddress'
$ref: 
'https://s3.amazonaws.com/st-swagger-docs/testschema.json/testschema.json#/definitions/PostalAddress'

fail with same error as before, but both work if I just cut and paste into 
browser

 $ref: 'http://localhost:8080/testschema.json#/definitions/PostalAddress'

the local ref still works fine.

On Friday, December 1, 2017 at 2:03:46 PM UTC-7, Ron wrote:
>
> That would make it difficult for me to figure out what’s wrong…
>
>  
>
>  
>
>  
>
> *From: *<swagger-sw...@googlegroups.com > on behalf of Gregg 
> Fiehler <gregg@gmail.com >
> *Reply-To: *"swagger-sw...@googlegroups.com " <
> swagger-sw...@googlegroups.com >
> *Date: *Friday, December 1, 2017 at 12:37
> *To: *Swagger <swagger-sw...@googlegroups.com >
> *Subject: *Re: Swagger Editor external reference local file vrs. remote
>
>  
>
> BTW their is a restriction on the S3 URL to only allow it to work inside 
> our firewall so you would not be able to access it for a test.
>
> On Friday, December 1, 2017 at 1:17:07 PM UTC-7, Gregg Fiehler wrote: 
>
> I don't think that is the issue, the network monitor in the browser shows 
> the call returned the data with a 200 response code and the response is 
> identical to when I use the local file.  Also I can just cut/paste the url 
> in the $ref in the browser and get the document.
>
> On Friday, December 1, 2017 at 12:58:37 PM UTC-7, Ron wrote: 
>
> It looks like the access to the file hosted on S3 is restricted, so the 
> editor can’t read it. You’d need to enable anonymous access to it.
>
>  
>
>  
>
>  
>
> *From: *<swagger-sw...@googlegroups.com> on behalf of Gregg Fiehler <
> gregg@gmail.com>
> *Reply-To: *"swagger-sw...@googlegroups.com" <
> swagger-sw...@googlegroups.com>
> *Date: *Friday, December 1, 2017 at 11:13
> *To: *Swagger <swagger-sw...@googlegroups.com>
> *Subject: *Re: Swagger Editor external reference local file vrs. remote
>
>  
>
> Ok I installed the latest and then had to change the local file ref to 
>
> $ref: '
> http://localhost:8080/ReservationEventDefinitions.json#/definitions/PostalAddress
> '
>
> now that works, but the remote still does not
> ErrorsResolver error at 
> paths./products.get.responses.200.schema.items.$ref
>
> Could not resolve reference because of: NetworkError when attempting to 
> fetch resource. 
>
>  
>
>
> but the network traffic still shows it as a 200
>
>
>
> On Friday, December 1, 2017 at 11:29:57 AM UTC-7, Ron wrote: 
>
> Hi Gregg,
>
>  
>
> That’s an old version of the editor which we don’t support anymore.
>
> Please try the latest version.
>
>  
>
>  
>
>  
>
> *From: *<swagger-sw...@googlegroups.com> on behalf of Gregg Fiehler <
> gregg@gmail.com>
> *Reply-To: *"swagger-sw...@googlegroups.com" <
> swagger-sw...@googlegroups.com>
> *Date: *Friday, December 1, 2017 at 09:44
> *To: *Swagger <swagger-sw...@googlegroups.com>
> *Subject: *Swagger Editor external reference local file vrs. remote
>
>  
>
> I have swagger editor running locally.  With Ron's help I got a local file 
> for an external reference to work
>
> fragment of swagger doc:
> responses:
> 200:
>   description: An array of products
>   schema:
> type: array
> items:
>   $ref: 
> 'ReservationEventDefinitions.json#/definitions/PostalAddress'
>
>
> I then put the same file in Amazon S3 and I cannot get it to work
>
>   i only updated the $ref line to
>
> $ref: '
> https://s3.amazonaws.com/st-swagger-docs/ReservationEventDefinitions.json#/definitions/PostalAddress
> '
>
> and I get 
> Swagger Error 
>
> Reference could not be resolved: 
> https://s3.amazonaws.com/st-swagger-docs/ReservationEventDefinitions.json#/definitions/PostalAddress
>
>  
>
> however when I look at the network traffic, both calls work. I have 
> attached the screen print of the editor with the error when using the 
> remote reference, the local one works fine.  So I assume there is a syntax 
> issue on how I am doing the remote reference.  Any help would be 
> appreciated.
>
>  
>
> Gregg
>
>  
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to swagger-swaggersocket+unsubscr...@googlegro

Re: Swagger Editor external reference local file vrs. remote

2017-12-01 Thread Ron Ratovsky
That would make it difficult for me to figure out what’s wrong…

 

 

 

From: <swagger-swaggersocket@googlegroups.com> on behalf of Gregg Fiehler 
<gregg.fieh...@gmail.com>
Reply-To: "swagger-swaggersocket@googlegroups.com" 
<swagger-swaggersocket@googlegroups.com>
Date: Friday, December 1, 2017 at 12:37
To: Swagger <swagger-swaggersocket@googlegroups.com>
Subject: Re: Swagger Editor external reference local file vrs. remote

 

BTW their is a restriction on the S3 URL to only allow it to work inside our 
firewall so you would not be able to access it for a test.

On Friday, December 1, 2017 at 1:17:07 PM UTC-7, Gregg Fiehler wrote: 

I don't think that is the issue, the network monitor in the browser shows the 
call returned the data with a 200 response code and the response is identical 
to when I use the local file.  Also I can just cut/paste the url in the $ref in 
the browser and get the document.

On Friday, December 1, 2017 at 12:58:37 PM UTC-7, Ron wrote: 

It looks like the access to the file hosted on S3 is restricted, so the editor 
can’t read it. You’d need to enable anonymous access to it.

 

 

 

From: <swagger-sw...@googlegroups.com> on behalf of Gregg Fiehler 
<gregg@gmail.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Friday, December 1, 2017 at 11:13
To: Swagger <swagger-sw...@googlegroups.com>
Subject: Re: Swagger Editor external reference local file vrs. remote

 

Ok I installed the latest and then had to change the local file ref to 

$ref: 
'http://localhost:8080/ReservationEventDefinitions.json#/definitions/PostalAddress'

now that works, but the remote still does not
Errors
Resolver error at paths./products.get.responses.200.schema.items.$ref
Could not resolve reference because of: NetworkError when attempting to fetch 
resource. 

 


but the network traffic still shows it as a 200



On Friday, December 1, 2017 at 11:29:57 AM UTC-7, Ron wrote: 

Hi Gregg,

 

That’s an old version of the editor which we don’t support anymore.

Please try the latest version.

 

 

 

From: <swagger-sw...@googlegroups.com> on behalf of Gregg Fiehler 
<gregg@gmail.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Friday, December 1, 2017 at 09:44
To: Swagger <swagger-sw...@googlegroups.com>
Subject: Swagger Editor external reference local file vrs. remote

 

I have swagger editor running locally.  With Ron's help I got a local file for 
an external reference to work

fragment of swagger doc:
responses:
200:
  description: An array of products
  schema:
type: array
items:
  $ref: 
'ReservationEventDefinitions.json#/definitions/PostalAddress'


I then put the same file in Amazon S3 and I cannot get it to work

  i only updated the $ref line to

$ref: 
'https://s3.amazonaws.com/st-swagger-docs/ReservationEventDefinitions.json#/definitions/PostalAddress'

and I get 
Swagger Error 
Reference could not be resolved: 
https://s3.amazonaws.com/st-swagger-docs/ReservationEventDefinitions.json#/definitions/PostalAddress

 

however when I look at the network traffic, both calls work. I have attached 
the screen print of the editor with the error when using the remote reference, 
the local one works fine.  So I assume there is a syntax issue on how I am 
doing the remote reference.  Any help would be appreciated.

 

Gregg

 

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger Editor external reference local file vrs. remote

2017-12-01 Thread Gregg Fiehler
BTW their is a restriction on the S3 URL to only allow it to work inside 
our firewall so you would not be able to access it for a test.

On Friday, December 1, 2017 at 1:17:07 PM UTC-7, Gregg Fiehler wrote:
>
> I don't think that is the issue, the network monitor in the browser shows 
> the call returned the data with a 200 response code and the response is 
> identical to when I use the local file.  Also I can just cut/paste the url 
> in the $ref in the browser and get the document.
>
> On Friday, December 1, 2017 at 12:58:37 PM UTC-7, Ron wrote:
>>
>> It looks like the access to the file hosted on S3 is restricted, so the 
>> editor can’t read it. You’d need to enable anonymous access to it.
>>
>>  
>>
>>  
>>
>>  
>>
>> *From: *<swagger-sw...@googlegroups.com> on behalf of Gregg Fiehler <
>> gregg@gmail.com>
>> *Reply-To: *"swagger-sw...@googlegroups.com" <
>> swagger-sw...@googlegroups.com>
>> *Date: *Friday, December 1, 2017 at 11:13
>> *To: *Swagger <swagger-sw...@googlegroups.com>
>> *Subject: *Re: Swagger Editor external reference local file vrs. remote
>>
>>  
>>
>> Ok I installed the latest and then had to change the local file ref to 
>>
>> $ref: '
>> http://localhost:8080/ReservationEventDefinitions.json#/definitions/PostalAddress
>> '
>>
>> now that works, but the remote still does not
>> ErrorsResolver error at 
>> paths./products.get.responses.200.schema.items.$ref
>>
>> Could not resolve reference because of: NetworkError when attempting to 
>> fetch resource. 
>>
>>  
>>
>>
>> but the network traffic still shows it as a 200
>>
>>
>>
>> On Friday, December 1, 2017 at 11:29:57 AM UTC-7, Ron wrote: 
>>
>> Hi Gregg,
>>
>>  
>>
>> That’s an old version of the editor which we don’t support anymore.
>>
>> Please try the latest version.
>>
>>  
>>
>>  
>>
>>  
>>
>> *From: *<swagger-sw...@googlegroups.com> on behalf of Gregg Fiehler <
>> gregg@gmail.com>
>> *Reply-To: *"swagger-sw...@googlegroups.com" <
>> swagger-sw...@googlegroups.com>
>> *Date: *Friday, December 1, 2017 at 09:44
>> *To: *Swagger <swagger-sw...@googlegroups.com>
>> *Subject: *Swagger Editor external reference local file vrs. remote
>>
>>  
>>
>> I have swagger editor running locally.  With Ron's help I got a local 
>> file for an external reference to work
>>
>> fragment of swagger doc:
>> responses:
>> 200:
>>   description: An array of products
>>   schema:
>> type: array
>> items:
>>   $ref: 
>> 'ReservationEventDefinitions.json#/definitions/PostalAddress'
>>
>>
>> I then put the same file in Amazon S3 and I cannot get it to work
>>
>>   i only updated the $ref line to
>>
>> $ref: '
>> https://s3.amazonaws.com/st-swagger-docs/ReservationEventDefinitions.json#/definitions/PostalAddress
>> '
>>
>> and I get 
>> Swagger Error 
>>
>> Reference could not be resolved: 
>> https://s3.amazonaws.com/st-swagger-docs/ReservationEventDefinitions.json#/definitions/PostalAddress
>>
>>  
>>
>> however when I look at the network traffic, both calls work. I have 
>> attached the screen print of the editor with the error when using the 
>> remote reference, the local one works fine.  So I assume there is a syntax 
>> issue on how I am doing the remote reference.  Any help would be 
>> appreciated.
>>
>>  
>>
>> Gregg
>>
>>  
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Swagger" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to swagger-swaggersocket+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Swagger" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to swagger-swaggersocket+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger Editor external reference local file vrs. remote

2017-12-01 Thread Gregg Fiehler
I don't think that is the issue, the network monitor in the browser shows 
the call returned the data with a 200 response code and the response is 
identical to when I use the local file.  Also I can just cut/paste the url 
in the $ref in the browser and get the document.

On Friday, December 1, 2017 at 12:58:37 PM UTC-7, Ron wrote:
>
> It looks like the access to the file hosted on S3 is restricted, so the 
> editor can’t read it. You’d need to enable anonymous access to it.
>
>  
>
>  
>
>  
>
> *From: *<swagger-sw...@googlegroups.com > on behalf of Gregg 
> Fiehler <gregg@gmail.com >
> *Reply-To: *"swagger-sw...@googlegroups.com " <
> swagger-sw...@googlegroups.com >
> *Date: *Friday, December 1, 2017 at 11:13
> *To: *Swagger <swagger-sw...@googlegroups.com >
> *Subject: *Re: Swagger Editor external reference local file vrs. remote
>
>  
>
> Ok I installed the latest and then had to change the local file ref to 
>
> $ref: '
> http://localhost:8080/ReservationEventDefinitions.json#/definitions/PostalAddress
> '
>
> now that works, but the remote still does not
> ErrorsResolver error at 
> paths./products.get.responses.200.schema.items.$ref
>
> Could not resolve reference because of: NetworkError when attempting to 
> fetch resource. 
>
>  
>
>
> but the network traffic still shows it as a 200
>
>
>
> On Friday, December 1, 2017 at 11:29:57 AM UTC-7, Ron wrote: 
>
> Hi Gregg,
>
>  
>
> That’s an old version of the editor which we don’t support anymore.
>
> Please try the latest version.
>
>  
>
>  
>
>  
>
> *From: *<swagger-sw...@googlegroups.com> on behalf of Gregg Fiehler <
> gregg@gmail.com>
> *Reply-To: *"swagger-sw...@googlegroups.com" <
> swagger-sw...@googlegroups.com>
> *Date: *Friday, December 1, 2017 at 09:44
> *To: *Swagger <swagger-sw...@googlegroups.com>
> *Subject: *Swagger Editor external reference local file vrs. remote
>
>  
>
> I have swagger editor running locally.  With Ron's help I got a local file 
> for an external reference to work
>
> fragment of swagger doc:
> responses:
> 200:
>   description: An array of products
>   schema:
> type: array
> items:
>   $ref: 
> 'ReservationEventDefinitions.json#/definitions/PostalAddress'
>
>
> I then put the same file in Amazon S3 and I cannot get it to work
>
>   i only updated the $ref line to
>
> $ref: '
> https://s3.amazonaws.com/st-swagger-docs/ReservationEventDefinitions.json#/definitions/PostalAddress
> '
>
> and I get 
> Swagger Error 
>
> Reference could not be resolved: 
> https://s3.amazonaws.com/st-swagger-docs/ReservationEventDefinitions.json#/definitions/PostalAddress
>
>  
>
> however when I look at the network traffic, both calls work. I have 
> attached the screen print of the editor with the error when using the 
> remote reference, the local one works fine.  So I assume there is a syntax 
> issue on how I am doing the remote reference.  Any help would be 
> appreciated.
>
>  
>
> Gregg
>
>  
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to swagger-swaggersocket+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to swagger-swaggersocket+unsubscr...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger Reference Title

2017-11-28 Thread Ron Ratovsky
Which version of swagger-ui do you use?

 

 

 

From:  on behalf of Titanpharao 

Reply-To: "swagger-swaggersocket@googlegroups.com" 

Date: Tuesday, November 28, 2017 at 01:52
To: Swagger 
Subject: Swagger Reference Title

 

Hello guys,

I have a simple question or found a bug?
We use Swagger for our Rest API and try to split the types to different files.

So we have now in our main file something like:
$ref: "../index.yaml#/components/schemas/MyType"

But inside the Swagger-UI the structure get solved in a wrong way.
=> "../index.yamlMyType"

He foudn the MyType but he still put the ../index.yaml in front ... looks 
strange?
Is it a bug or a feature?

Thanks for help already
Oliver

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger UI - how to configure proxy for validation

2017-11-20 Thread Kyle Shockey
Hey David!

Unfortunately, there's no way to give proxy auth information to the Online 
Validator service. 

You can disable that feature altogether by passing

validatorUrl: null

as a Swagger-UI configuration option, if you want to silence the error in 
your console (and save a request).

On Wednesday, November 15, 2017 at 7:47:17 AM UTC-8, David Hileman wrote:
>
> Hi,
>
> I am trying to use swagger ui, setup like this:
>
>   const ui = SwaggerUIBundle({
> // fixme: Change to absolute URL when all is setup
> url: "/static/swagger.json",
> dom_id: '#swagger-ui',
> presets: [
>   SwaggerUIBundle.presets.apis,
>   Array.isArray(SwaggerUIStandalonePreset) ? SwaggerUIStandalonePreset 
> : SwaggerUIStandalonePreset.default
> ],
> plugins: [
>   SwaggerUIBundle.plugins.DownloadUrl
> ],
> layout: "StandaloneLayout"
>   })
>
> However, my computer is required to use a company proxy for outgoing http 
> requests. So when swagger attempts to validate, I get an error like this in 
> my browser console:
>
> Request URL: https://online.swagger.io/validator?url=/static/swagger.json
> Request method: GET
> Status code: 407 Proxy Authentication Required
>
> Is there anyway to configure swagger to authenticate with a proxy when 
> making this call to the validator?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger UI - attempt to "extend" referenced/reused path object with additional parameter

2017-11-10 Thread Ron Ratovsky
JSON References cannot be extended – see 
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#referenceObject.

 

Currently, the editor for 3.0.0 does not show semantic errors, so it’s not 
covered by it. Technically, it’s not an error, it’s just meaningless (and we 
show it as a warning).

 

 

 

From:  on behalf of Andy Schmidt 

Reply-To: "swagger-swaggersocket@googlegroups.com" 

Date: Friday, November 10, 2017 at 09:14
To: Swagger 
Subject: Swagger UI - attempt to "extend" referenced/reused path object with 
additional parameter

 

Hi, 

 

It's possible I'm doing something unsupported - but at least the Swagger.io 
Editor does not REJECT it as being formally wrong. However, the Swagger.io UI 
seems to get confused.

 

In the example below, with the yellow "$ref" commented out, the UI will show 
the two distinct paths as expected.

 

However, when I make the $ref active (attempting to reuse the /sources/{uid} 
definition as "least common denominator", and extend it with additional 
(non-conflicting) parameter from /source/{neighbors}_{uid}), the result in the 
UI is rather unexpected:
The first path suddenly has the parameter from the SECOND path?
openopenapi: "3.0.0"
info:
  version: 1.0.0
  title: Test
servers:
  - url: http://api.test.com/v1
paths:
  /sources/{uid}:
get:
  summary: Retrieve one individual Source object.
  parameters:
- $ref: "#/components/parameters/Path_uid"
  responses:
default:
  description: Default Response
  /sources/{neighbor}_{uid}:
#   $ref: "#/paths/~1sources~1{uid}"
get:
  summary: Retrieve the neighbor of one individual Source object.
  parameters:
- $ref: "#/components/parameters/Path_neighbor"
  responses:
'200': # OK
  description: Test Response
components:
  parameters:
Path_uid:
  name: uid
  in: path
  description: The unique ID of the object to be accessed, or "first" or 
"last".
  required: true
  schema:
oneOf: 
- type: integer
- type: string
  enum: [first, last]
Path_neighbor:
  name: neighbor
  in: path
  description: The direction, either "before" or "after", relative to the 
unique ID.
  required: true
  schema:
type: string
enum: [before,after]

 

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger 3.0 unable to render example field in parameters?

2017-11-09 Thread Ron Ratovsky
It’s not implemented yet.

 

 

 

From:  on behalf of Vedant Goenka 
<19ved...@gmail.com>
Reply-To: "swagger-swaggersocket@googlegroups.com" 

Date: Thursday, November 9, 2017 at 03:38
To: Swagger 
Subject: Swagger 3.0 unable to render example field in parameters?

 

Hi, 

 

I'm using Swagger 3.0. I'm using the example field as described in 
https://swagger.io/docs/specification/adding-examples/ to specify a sample 
parameter. However swagger doesn't seem to be rendering it properly as it is 
not showing on the UI. Is this a swagger error or are examples specified 
differently in parameters?

 

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger Core 2.0.0-rc2 with RESTEasy 3.x example

2017-11-02 Thread Francesco Tumanischvili
New RESTEasy specific modules have been added to swagger-samples, please 
check them out, they cover a (non exhaustive) set of possible 
scenarios: https://github.com/swagger-api/swagger-samples/tree/2.0/java. 
They work with latest swagger-core 2.0.0-SNAPSHOT version (available in 
sonatype), the majority should probably work also with 2.0.0-rc2 release 
candidate, but it's better to use latest snapshot, which changes will be 
part of next rc.

Also you mentioned that pulling the samples repo, and starting the jersey2 
example doesn't work; can you share some more details, what error do you 
get?


Il giorno mercoledì 25 ottobre 2017 19:11:48 UTC+2, Mathis Møller ha 
scritto:
>
> Yes, I even pulled the repo and started the example up. It doesn't work.
>
> And I can't use a JerseyServletContainer, when I'm using RESTEasy.
>
>
> On Wednesday, 25 October 2017 19:03:37 UTC+2, Ron wrote:
>>
>> Did you get a chance to take a look at the sample in 
>> https://github.com/swagger-api/swagger-samples/tree/2.0/java/java-jersey2
>> ?
>>
>>  
>>
>>  
>>
>>  
>>
>> *From: *<swagger-sw...@googlegroups.com> on behalf of Mathis Møller <
>> thi...@gmail.com>
>> *Reply-To: *"swagger-sw...@googlegroups.com" <
>> swagger-sw...@googlegroups.com>
>> *Date: *Wednesday, October 25, 2017 at 09:49
>> *To: *Swagger <swagger-sw...@googlegroups.com>
>> *Subject: *Re: Swagger Core 2.0.0-rc2 with RESTEasy 3.x example
>>
>>  
>>
>> I tried to follow the Jersey example without luck. 
>>
>>  
>>
>> I came as far as setting up the OpenApiServlet, but I can't get Swagger 
>> to "find" my @Operation annotations on my RESTEasy services.
>>
>>  
>>
>> You got any idea of what I'm missing or could you provide a super quick 
>> guide?
>>
>>
>> On Wednesday, 25 October 2017 18:42:15 UTC+2, Ron wrote: 
>>
>> We currently don’t have examples for RESTEasy, but we do for Jersey. It 
>> should be simple enough to follow a similar route in RESTEasy.
>>
>>  
>>
>>  
>>
>> *From: *<swagger-sw...@googlegroups.com> on behalf of Mathis Møller <
>> thi...@gmail.com>
>> *Reply-To: *"swagger-sw...@googlegroups.com" <
>> swagger-sw...@googlegroups.com>
>> *Date: *Wednesday, October 25, 2017 at 04:59
>> *To: *Swagger <swagger-sw...@googlegroups.com>
>> *Subject: *Swagger Core 2.0.0-rc2 with RESTEasy 3.x example
>>
>>  
>>
>> I'm currently trying to get the new version of Swagger Core to work with 
>> a Wildfly application using RESTEasy 3.0.12. 
>>
>>  
>>
>> I have tried to follow a mix between 
>> https://github.com/swagger-api/swagger-core/wiki/Swagger-Core-JAX-RS-Project-Setup-2.0.X
>>  
>> and 
>> https://github.com/swagger-api/swagger-core/wiki/Swagger-Core-RESTEasy-2.X-Project-Setup-1.5
>>  
>> with no luck.
>>
>>  
>>
>> Are there any examples/guide to use the new Swagger Core with RESTEasy 3?
>>
>>  
>>
>> Thanks in advance.
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Swagger" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to swagger-swaggersocket+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Swagger" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to swagger-swaggersocket+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger 3.0.0 editor which support multiple files

2017-11-01 Thread Ron Ratovsky
The master version of swagger-editor already supports OAS3.

 

 

From: <swagger-swaggersocket@googlegroups.com> on behalf of Hung Nguyen 
<hungnd@gmail.com>
Reply-To: "swagger-swaggersocket@googlegroups.com" 
<swagger-swaggersocket@googlegroups.com>
Date: Tuesday, October 31, 2017 at 21:55
To: Swagger <swagger-swaggersocket@googlegroups.com>
Subject: Re: Swagger 3.0.0 editor which support multiple files

 

Hi Ron, 

 

I check out swagger editor source from github. But it just supports OAS 2.0. 

Do you know progress that they're developing. If OAS 3.0 has already supported, 
could you please tell me know how to get the source?

 

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger 3.0.0 editor which support multiple files

2017-10-31 Thread Hung Nguyen
Hi Ron,

I check out swagger editor source from github. But it just supports OAS 
2.0. 
Do you know progress that they're developing. If OAS 3.0 has already 
supported, could you please tell me know how to get the source?

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: swagger-scala-module compatibility with OAS 3

2017-10-31 Thread Ron Ratovsky
Not in the immediate future.

 

 

 

From: <swagger-swaggersocket@googlegroups.com> on behalf of Javier García 
Visiedo <javier.g.visi...@gmail.com>
Reply-To: "swagger-swaggersocket@googlegroups.com" 
<swagger-swaggersocket@googlegroups.com>
Date: Tuesday, October 31, 2017 at 09:53
To: "swagger-swaggersocket@googlegroups.com" 
<swagger-swaggersocket@googlegroups.com>
Subject: Re: swagger-scala-module compatibility with OAS 3

 

Any plans to make swagger-scala-module compatible with swagger-core 2?

 

On Mon, 30 Oct 2017 at 20:16, Ron Ratovsky <r...@swagger.io> wrote:

We should change that claim – it does not support swagger-core 2.0.0.

 

 

 

From: <swagger-swaggersocket@googlegroups.com> on behalf of "Javier G. Visiedo" 
<javier.g.visi...@gmail.com>
Reply-To: "swagger-swaggersocket@googlegroups.com" 
<swagger-swaggersocket@googlegroups.com>
Date: Monday, October 30, 2017 at 07:45
To: Swagger <swagger-swaggersocket@googlegroups.com>
Subject: swagger-scala-module compatibility with OAS 3

 

Hi, 

the swagger-scala-module claims to be compatible with "swagger-core 1.5.x or 
greater". 

 

Does it mean it is compatible with swagger-core 2.0.0 supporting OpenAPI 3.0 
spec?

 

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to a topic in the Google 
Groups "Swagger" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/swagger-swaggersocket/2VS15-tkOek/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 
swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: swagger-scala-module compatibility with OAS 3

2017-10-31 Thread Javier García Visiedo
Any plans to make swagger-scala-module compatible with swagger-core 2?

On Mon, 30 Oct 2017 at 20:16, Ron Ratovsky  wrote:

> We should change that claim – it does not support swagger-core 2.0.0.
>
>
>
>
>
>
>
> *From: * on behalf of "Javier G.
> Visiedo" 
> *Reply-To: *"swagger-swaggersocket@googlegroups.com" <
> swagger-swaggersocket@googlegroups.com>
> *Date: *Monday, October 30, 2017 at 07:45
> *To: *Swagger 
> *Subject: *swagger-scala-module compatibility with OAS 3
>
>
>
> Hi,
>
> the swagger-scala-module claims to be compatible with "swagger-core 1.5.x
> or greater".
>
>
>
> Does it mean it is compatible with swagger-core 2.0.0 supporting OpenAPI
> 3.0 spec?
>
>
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to swagger-swaggersocket+unsubscr...@googlegroups.com.
>
>
> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Swagger" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/swagger-swaggersocket/2VS15-tkOek/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> swagger-swaggersocket+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger 3.0.0 editor which support multiple files

2017-10-31 Thread Ron Ratovsky
Hi Rakesh,

 

For more information about Domains and how to reference those as external 
resources, please refer to the online documentation at 
https://app.swaggerhub.com/help/domains/index.

 

If you need further assistance with SwaggerHub, please use the online chat 
(would be an icon to the left of your username at the top bar) and they’d be 
happy to answer any further questions.

 

 

 

From: <swagger-swaggersocket@googlegroups.com> on behalf of rakesh kumar jha 
<mannat4rak...@gmail.com>
Reply-To: "swagger-swaggersocket@googlegroups.com" 
<swagger-swaggersocket@googlegroups.com>
Date: Monday, October 30, 2017 at 22:49
To: Swagger <swagger-swaggersocket@googlegroups.com>
Subject: Re: Swagger 3.0.0 editor which support multiple files

 

Hi Ron. 

 

I am using the tool mentioned by you however not seeing any way by which in an 
API OAS file I can refer another file. Could you please elaborate on this how 
can i use it.

On Monday, 30 October 2017 12:25:44 UTC-7, Ron wrote: 

We have a product that allows you to do that - https://swaggerhub.com/

 

 

From: <swagger-sw...@googlegroups.com> on behalf of rakesh kumar jha 
<mannat...@gmail.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Saturday, October 28, 2017 at 20:05
To: Swagger <swagger-sw...@googlegroups.com>
Subject: Swagger 3.0.0 editor which support multiple files

 

Hi, 

 

I have seen lots of editors for swagger 3.0.0, and they allow working on a 
single file. This look good for some small APIs but in an enterprise it has no 
meaning as the number of Schema, Examples and Parameters will increase and also 
error responses will be common across multiple APIs. Like RAML provides a way 
to create separate file in separate  folders and include them in actual file, 
do we have something like that in OAS 3.0.0.

 

Thanks,

Rakesh Jha

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger 3.0.0 editor which support multiple files

2017-10-30 Thread rakesh kumar jha
Hi Ron.

I am using the tool mentioned by you however not seeing any way by which in 
an API OAS file I can refer another file. Could you please elaborate on 
this how can i use it.

On Monday, 30 October 2017 12:25:44 UTC-7, Ron wrote:
>
> We have a product that allows you to do that - https://swaggerhub.com/
>
>  
>
>  
>
> *From: * on behalf of 
> rakesh kumar jha 
> *Reply-To: *"swagger-sw...@googlegroups.com " <
> swagger-sw...@googlegroups.com >
> *Date: *Saturday, October 28, 2017 at 20:05
> *To: *Swagger 
> *Subject: *Swagger 3.0.0 editor which support multiple files
>
>  
>
> Hi, 
>
>  
>
> I have seen lots of editors for swagger 3.0.0, and they allow working on a 
> single file. This look good for some small APIs but in an enterprise it has 
> no meaning as the number of Schema, Examples and Parameters will increase 
> and also error responses will be common across multiple APIs. Like RAML 
> provides a way to create separate file in separate  folders and include 
> them in actual file, do we have something like that in OAS 3.0.0.
>
>  
>
> Thanks,
>
> Rakesh Jha
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to swagger-swaggersocket+unsubscr...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger ignores pattern when creating sample request/response.

2017-10-30 Thread Ron Ratovsky
I don’t understand the question.

 

 

 

From: <swagger-swaggersocket@googlegroups.com> on behalf of Krithika Vittal 
<krithika.vit...@gmail.com>
Reply-To: "swagger-swaggersocket@googlegroups.com" 
<swagger-swaggersocket@googlegroups.com>
Date: Monday, October 30, 2017 at 12:24
To: Swagger <swagger-swaggersocket@googlegroups.com>
Subject: Re: Swagger ignores pattern when creating sample request/response.

 

Also , Could you please let me know the purpose of using the pattern option in 
the swagger file ? Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger 3.0.0 editor which support multiple files

2017-10-30 Thread Ron Ratovsky
We have a product that allows you to do that - https://swaggerhub.com/

 

 

From:  on behalf of rakesh kumar jha 

Reply-To: "swagger-swaggersocket@googlegroups.com" 

Date: Saturday, October 28, 2017 at 20:05
To: Swagger 
Subject: Swagger 3.0.0 editor which support multiple files

 

Hi, 

 

I have seen lots of editors for swagger 3.0.0, and they allow working on a 
single file. This look good for some small APIs but in an enterprise it has no 
meaning as the number of Schema, Examples and Parameters will increase and also 
error responses will be common across multiple APIs. Like RAML provides a way 
to create separate file in separate  folders and include them in actual file, 
do we have something like that in OAS 3.0.0.

 

Thanks,

Rakesh Jha

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger ignores pattern when creating sample request/response.

2017-10-30 Thread Krithika Vittal
Also , Could you please let me know the purpose of using the pattern option 
in the swagger file ? Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger ignores pattern when creating sample request/response.

2017-10-30 Thread Ron Ratovsky
Follow the template in https://github.com/swagger-api/swagger-ui/issues/new 
(the details are important).

 

 

 

From: <swagger-swaggersocket@googlegroups.com> on behalf of Krithika Vittal 
<krithika.vit...@gmail.com>
Reply-To: "swagger-swaggersocket@googlegroups.com" 
<swagger-swaggersocket@googlegroups.com>
Date: Monday, October 30, 2017 at 12:22
To: Swagger <swagger-swaggersocket@googlegroups.com>
Subject: Re: Swagger ignores pattern when creating sample request/response.

 

Hi Ron, 

 

Could you please let me know the process to file a ticket with the project ? 

 

Thanks,

Krithika.

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger ignores pattern when creating sample request/response.

2017-10-30 Thread Krithika Vittal
Hi Ron,

Could you please let me know the process to file a ticket with the project 
? 

Thanks,
Krithika.

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: swagger-scala-module compatibility with OAS 3

2017-10-30 Thread Ron Ratovsky
We should change that claim – it does not support swagger-core 2.0.0.

 

 

 

From:  on behalf of "Javier G. Visiedo" 

Reply-To: "swagger-swaggersocket@googlegroups.com" 

Date: Monday, October 30, 2017 at 07:45
To: Swagger 
Subject: swagger-scala-module compatibility with OAS 3

 

Hi, 

the swagger-scala-module claims to be compatible with "swagger-core 1.5.x or 
greater". 

 

Does it mean it is compatible with swagger-core 2.0.0 supporting OpenAPI 3.0 
spec?

 

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger ignores pattern when creating sample request/response.

2017-10-30 Thread Ron Ratovsky
We currently don’t take that under consideration when generating sample data. 
If you’d like to see it change, please file a ticket with the project.

 

 

From:  on behalf of Krithika Vittal 

Reply-To: "swagger-swaggersocket@googlegroups.com" 

Date: Monday, October 30, 2017 at 11:18
To: Swagger 
Subject: Swagger ignores pattern when creating sample request/response.

 

 

Below is the definition I am using for a request json , 

 

  SampleRequest:

type: object

required:

  - version

  - lang

  - origin

  - mobileDeviceIdentifiers

properties:

  version:

type: string

pattern: (\d+\.)(\d+\.)(\d)

  lang:

type: string

example: fr

  origin:

type: string

example: WEB

  mobileDeviceIdentifiers:

required:

  - uniqueDeviceID

  - devicePlatform

  - deviceModel

  - deviceOSVersion

properties:

  uniqueDeviceID:

type: string

example: c3877886787

  devicePlatform:

type: string

example: Android

  deviceModel:

type: string

example: Nexus 5

  deviceOSVersion:

type: string

example: '6.0'

xml:

  name: SampleRequest

 

Swagger documentation does not render a value confirming to the regex 
'(\d+\.)(\d+\.)(\d)' instead the response is just displayed as below,

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Could you please help to resolve ? Thanks.

 

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger UI - Prevent URL Hash Change

2017-10-30 Thread Nausherwan Korai
Did you ever get this to work? In the same boat

On Tuesday, 15 November 2016 12:44:49 UTC-5, Eugene Gordeiev wrote:
>
> Is there any way to prevent Swagger UI URL Hash change when clicking on 
> different links?
>
> I'm integrating Swagger UI into my application which already uses hash 
> based URL and when I click on the item in Swagger UI, it remove my hash URL 
> and adds Swagger, as a result it breaks my navigation.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger Core 2.0.0-rc2 with RESTEasy 3.x example

2017-10-25 Thread Mathis Møller
Yes, I even pulled the repo and started the example up. It doesn't work.

And I can't use a JerseyServletContainer, when I'm using RESTEasy.


On Wednesday, 25 October 2017 19:03:37 UTC+2, Ron wrote:
>
> Did you get a chance to take a look at the sample in 
> https://github.com/swagger-api/swagger-samples/tree/2.0/java/java-jersey2?
>
>  
>
>  
>
>  
>
> *From: *<swagger-sw...@googlegroups.com > on behalf of 
> Mathis Møller <thi...@gmail.com >
> *Reply-To: *"swagger-sw...@googlegroups.com " <
> swagger-sw...@googlegroups.com >
> *Date: *Wednesday, October 25, 2017 at 09:49
> *To: *Swagger <swagger-sw...@googlegroups.com >
> *Subject: *Re: Swagger Core 2.0.0-rc2 with RESTEasy 3.x example
>
>  
>
> I tried to follow the Jersey example without luck. 
>
>  
>
> I came as far as setting up the OpenApiServlet, but I can't get Swagger to 
> "find" my @Operation annotations on my RESTEasy services.
>
>  
>
> You got any idea of what I'm missing or could you provide a super quick 
> guide?
>
>
> On Wednesday, 25 October 2017 18:42:15 UTC+2, Ron wrote: 
>
> We currently don’t have examples for RESTEasy, but we do for Jersey. It 
> should be simple enough to follow a similar route in RESTEasy.
>
>  
>
>  
>
> *From: *<swagger-sw...@googlegroups.com> on behalf of Mathis Møller <
> thi...@gmail.com>
> *Reply-To: *"swagger-sw...@googlegroups.com" <
> swagger-sw...@googlegroups.com>
> *Date: *Wednesday, October 25, 2017 at 04:59
> *To: *Swagger <swagger-sw...@googlegroups.com>
> *Subject: *Swagger Core 2.0.0-rc2 with RESTEasy 3.x example
>
>  
>
> I'm currently trying to get the new version of Swagger Core to work with a 
> Wildfly application using RESTEasy 3.0.12. 
>
>  
>
> I have tried to follow a mix between 
> https://github.com/swagger-api/swagger-core/wiki/Swagger-Core-JAX-RS-Project-Setup-2.0.X
>  
> and 
> https://github.com/swagger-api/swagger-core/wiki/Swagger-Core-RESTEasy-2.X-Project-Setup-1.5
>  
> with no luck.
>
>  
>
> Are there any examples/guide to use the new Swagger Core with RESTEasy 3?
>
>  
>
> Thanks in advance.
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to swagger-swaggersocket+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to swagger-swaggersocket+unsubscr...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger Core 2.0.0-rc2 with RESTEasy 3.x example

2017-10-25 Thread Ron Ratovsky
Did you get a chance to take a look at the sample in 
https://github.com/swagger-api/swagger-samples/tree/2.0/java/java-jersey2?

 

 

 

From: <swagger-swaggersocket@googlegroups.com> on behalf of Mathis Møller 
<this...@gmail.com>
Reply-To: "swagger-swaggersocket@googlegroups.com" 
<swagger-swaggersocket@googlegroups.com>
Date: Wednesday, October 25, 2017 at 09:49
To: Swagger <swagger-swaggersocket@googlegroups.com>
Subject: Re: Swagger Core 2.0.0-rc2 with RESTEasy 3.x example

 

I tried to follow the Jersey example without luck. 

 

I came as far as setting up the OpenApiServlet, but I can't get Swagger to 
"find" my @Operation annotations on my RESTEasy services.

 

You got any idea of what I'm missing or could you provide a super quick guide?


On Wednesday, 25 October 2017 18:42:15 UTC+2, Ron wrote: 

We currently don’t have examples for RESTEasy, but we do for Jersey. It should 
be simple enough to follow a similar route in RESTEasy.

 

 

From: <swagger-sw...@googlegroups.com> on behalf of Mathis Møller 
<thi...@gmail.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Wednesday, October 25, 2017 at 04:59
To: Swagger <swagger-sw...@googlegroups.com>
Subject: Swagger Core 2.0.0-rc2 with RESTEasy 3.x example

 

I'm currently trying to get the new version of Swagger Core to work with a 
Wildfly application using RESTEasy 3.0.12. 

 

I have tried to follow a mix between 
https://github.com/swagger-api/swagger-core/wiki/Swagger-Core-JAX-RS-Project-Setup-2.0.X
 and 
https://github.com/swagger-api/swagger-core/wiki/Swagger-Core-RESTEasy-2.X-Project-Setup-1.5
 with no luck.

 

Are there any examples/guide to use the new Swagger Core with RESTEasy 3?

 

Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger Core 2.0.0-rc2 with RESTEasy 3.x example

2017-10-25 Thread Mathis Møller
I tried to follow the Jersey example without luck.

I came as far as setting up the OpenApiServlet, but I can't get Swagger to 
"find" my @Operation annotations on my RESTEasy services.

You got any idea of what I'm missing or could you provide a super quick 
guide?

On Wednesday, 25 October 2017 18:42:15 UTC+2, Ron wrote:
>
> We currently don’t have examples for RESTEasy, but we do for Jersey. It 
> should be simple enough to follow a similar route in RESTEasy.
>
>  
>
>  
>
> *From: * on behalf of 
> Mathis Møller 
> *Reply-To: *"swagger-sw...@googlegroups.com " <
> swagger-sw...@googlegroups.com >
> *Date: *Wednesday, October 25, 2017 at 04:59
> *To: *Swagger 
> *Subject: *Swagger Core 2.0.0-rc2 with RESTEasy 3.x example
>
>  
>
> I'm currently trying to get the new version of Swagger Core to work with a 
> Wildfly application using RESTEasy 3.0.12. 
>
>  
>
> I have tried to follow a mix between 
> https://github.com/swagger-api/swagger-core/wiki/Swagger-Core-JAX-RS-Project-Setup-2.0.X
>  
> and 
> https://github.com/swagger-api/swagger-core/wiki/Swagger-Core-RESTEasy-2.X-Project-Setup-1.5
>  
> with no luck.
>
>  
>
> Are there any examples/guide to use the new Swagger Core with RESTEasy 3?
>
>  
>
> Thanks in advance.
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to swagger-swaggersocket+unsubscr...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger Core 2.0.0-rc2 with RESTEasy 3.x example

2017-10-25 Thread Ron Ratovsky
We currently don’t have examples for RESTEasy, but we do for Jersey. It should 
be simple enough to follow a similar route in RESTEasy.

 

 

From:  on behalf of Mathis Møller 

Reply-To: "swagger-swaggersocket@googlegroups.com" 

Date: Wednesday, October 25, 2017 at 04:59
To: Swagger 
Subject: Swagger Core 2.0.0-rc2 with RESTEasy 3.x example

 

I'm currently trying to get the new version of Swagger Core to work with a 
Wildfly application using RESTEasy 3.0.12. 

 

I have tried to follow a mix between 
https://github.com/swagger-api/swagger-core/wiki/Swagger-Core-JAX-RS-Project-Setup-2.0.X
 and 
https://github.com/swagger-api/swagger-core/wiki/Swagger-Core-RESTEasy-2.X-Project-Setup-1.5
 with no luck.

 

Are there any examples/guide to use the new Swagger Core with RESTEasy 3?

 

Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: swagger + java rest repositores

2017-10-19 Thread Eitan Herman
sure.

in java we use rest-repository (spring data rest 
) https://projects.spring.io/spring-data-rest/
it means we don't code controllers it's made dynamically by spring.
but those controllers (services) are not listed in swagger.

so how can i see them too? all the crud services in best practice done with 
spring-data-rest...

eitan

On Thursday, October 19, 2017 at 5:34:49 PM UTC+3, Ron wrote:
>
> Hi Eitan, the question isn’t very clear. Can you clarify what you mean?
>
>  
>
>  
>
>  
>
> *From: * on behalf of Eitan 
> Herman 
> *Reply-To: *"swagger-sw...@googlegroups.com " <
> swagger-sw...@googlegroups.com >
> *Date: *Thursday, October 19, 2017 at 01:44
> *To: *Swagger 
> *Subject: *swagger + java rest repositores
>
>  
>
> Hello Swaggers 
>
>  
>
> How can i see all rest repository on swagger, what is the best practice 
> with that?
>
>  
>
> Thanks
>
> Eitan Herman
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to swagger-swaggersocket+unsubscr...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: swagger + java rest repositores

2017-10-19 Thread Ron Ratovsky
Hi Eitan, the question isn’t very clear. Can you clarify what you mean?

 

 

 

From:  on behalf of Eitan Herman 

Reply-To: "swagger-swaggersocket@googlegroups.com" 

Date: Thursday, October 19, 2017 at 01:44
To: Swagger 
Subject: swagger + java rest repositores

 

Hello Swaggers 

 

How can i see all rest repository on swagger, what is the best practice with 
that?

 

Thanks

Eitan Herman

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger UI for REST Request body example

2017-10-13 Thread Ron Ratovsky
It’s not implemented in the UI yet. You can file a ticket with the project.

 

 

 

From:  on behalf of Provash Dowari 

Reply-To: "swagger-swaggersocket@googlegroups.com" 

Date: Friday, October 13, 2017 at 14:42
To: Swagger 
Subject: Swagger UI for REST Request body example

 

Hi, 

 

I have query for example request body rendering in Swagger UI. I am using 
swagger-jaxrs2-2.0.0-rc2 version for document json generation and 
swagger-ui-v3.3.1 for UI. Below is my sample code for REST Resource.

 

Sample Code :

test(@RequestBody(required = true, content = @Content(mediaType = 
APPLICATION_JSON,schema = @Schema(implementation = Foo.class, example ="fooex1" 
)
   ,examples 
={@ExampleObject(name="fooExternalEx1",externalValue="http://localhost:8080/receiver/fooExternalEx1.json;)}))
 Foo f) {
  
}
 
As per Open API spec documentation, UI should replace schema example  with 
Content example. But UI does not rendering external example. I have seen 
generated openapi.json has reference to external example.
 
openapi.json snippet:
"requestBody" : {
  "content" : {
    "application/json" : {
  "schema" : {
    "$ref" : "#/components/schemas/Foo"
  },
  "examples" : {
    "fooExternalEx1" : {
  "description" : "fooExternalEx1",
  "externalValue" : 
"http://localhost:8080/receiver/fooExternalEx1.json;
    }
      }
    }
  },
  "required" : true
    },
 
Please let me know what could be the issue or Do I have to do any other 
configuration.
 
 
Regards,
Provash
-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger integration with mysql db for log collection

2017-10-13 Thread Ron Ratovsky
Not really sure which tools you’re referring to.

 

 

From:  on behalf of 
"jaychandransubraman...@gmail.com" 
Reply-To: "swagger-swaggersocket@googlegroups.com" 

Date: Friday, October 13, 2017 at 09:48
To: Swagger 
Subject: Swagger integration with mysql db for log collection

 

Hi , 

 

I have installed swagger API tools in Ubuntu VM . I would like to get integrate 
mysql db with Swagger API framework .

 

Please let us know the steps to do the same

 

Thanks 

Jay

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger Dropwizard Authentication

2017-10-09 Thread piyush mendhiratta
Nevermind. I am able to fix this by fixing the CORS.

But I have another issue. Instead of using @Auth PrincipalImpl user, I am
using my own class.

@Auth AuthenticatedUser user


And getting this exception.

0:0:0:0:0:0:0:1 -  -  [10/Oct/2017:04:38:37 +] "GET
/service/class/all/a HTTP/1.1" 415 - "http://127.0.0.1:3001/;
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/61.0.3163.100 Safari/537.36" 1

ERROR [2017-10-10 04:38:37,452]
com.sun.jersey.spi.container.ContainerRequest: A message body reader
for Java class com.appgroup.dataaccess.security.AuthenticatedUser, and
Java type class com.appgroup.dataaccess.security.AuthenticatedUser,
and MIME media type application/octet-stream was not found.

The registered message body readers compatible with the MIME media type are:
*/* ->
  com.sun.jersey.core.impl.provider.entity.FormProvider
  com.sun.jersey.core.impl.provider.entity.MimeMultipartProvider



where

public class AuthenticatedUser extends com.appgroup.security.User {

// usrAuthenticated indicates that we have an actual usr.usr to
work with in authenticatedName
private boolean usrAuthenticated;


public AuthenticatedUser(String usr, String displayName, String
givenName, String surname, String emailAddr) {
super(usr,displayName,givenName,surname,emailAddr);
this.usrAuthenticated = true;
}

public boolean isUsrAuthenticated() {
return usrAuthenticated;
}

public void setUsrAuthenticated(boolean usrAuthenticated) {
this.usrAuthenticated = usrAuthenticated;
}
}


And


//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.appgroup.security;

import com.fasterxml.jackson.annotation.JsonIgnore;
import java.beans.ConstructorProperties;

public class User {
private final String authenticatedName;
private final String displayName;
private final String givenName;
private final String surname;
private final String emailAddress;
private String sessionId;
@JsonIgnore
private boolean superUser = false;

@ConstructorProperties({"authenticatedName", "displayName",
"givenName", "surname", "emailAddress"})
public User(String authenticatedName, String displayName, String
givenName, String surname, String emailAddress) {
this.authenticatedName = authenticatedName;
this.displayName = displayName;
this.givenName = givenName;
this.surname = surname;
this.emailAddress = emailAddress;
}

public String getAuthenticatedName() {
return this.authenticatedName;
}

public String getDisplayName() {
return this.displayName;
}

public String getGivenName() {
return this.givenName;
}

public String getSurname() {
return this.surname;
}

public String getEmailAddress() {
return this.emailAddress;
}

public String getSessionId() {
return this.sessionId;
}

public boolean isSuperUser() {
return this.superUser;
}

public void setSessionId(String sessionId) {
this.sessionId = sessionId;
}

public void setSuperUser(boolean superUser) {
this.superUser = superUser;
}

public boolean equals(Object o) {
if(o == this) {
return true;
} else if(!(o instanceof AuthenticatedUser)) {
return false;
} else {
AuthenticatedUser other = (AuthenticatedUser)o;
if(!other.canEqual(this)) {
return false;
} else {
label87: {
String this$authenticatedName = this.getAuthenticatedName();
String other$authenticatedName =
other.getAuthenticatedName();
if(this$authenticatedName == null) {
if(other$authenticatedName == null) {
break label87;
}
} else
if(this$authenticatedName.equals(other$authenticatedName)) {
break label87;
}

return false;
}

String this$displayName = this.getDisplayName();
String other$displayName = other.getDisplayName();
if(this$displayName == null) {
if(other$displayName != null) {
return false;
}
} else if(!this$displayName.equals(other$displayName)) {
return false;
}

label73: {
String this$givenName = this.getGivenName();
String other$givenName = other.getGivenName();
if(this$givenName == null) {
if(other$givenName == null) {
break label73;
}
} else 

Re: Swagger Dropwizard Authentication

2017-10-09 Thread Piyush Mendhiratta
Thanks Ron,

This works for me. But now I am running into another issues,

 When I am sending a GET request with following prototype, It sends a 
OPTIONS call from swagger editor, which returns a 200 response, But how 
will I send the GET request to get the API working.?

  public Saying secret(@ApiParam(hidden = true) @Auth PrincipalImpl user) {




Thanks
Piyush

On Monday, October 9, 2017 at 11:01:47 PM UTC+5:30, Ron wrote:
>
> You can hide any generated parameter by adding the @ApiParam(hidden=true) 
> annotation.
>
>  
>
>  
>
>  
>
> *From: * on behalf of 
> Piyush Mendhiratta 
> *Reply-To: *"swagger-sw...@googlegroups.com " <
> swagger-sw...@googlegroups.com >
> *Date: *Monday, October 9, 2017 at 01:18
> *To: *Swagger 
> *Subject: *Swagger Dropwizard Authentication
>
>  
>
> I am trying to create swagger using the swaggerUI. My API framework uses 
> dropwizard. Now when I am trying to use a GET resource with @Auth for 
> authentication, swagger that is generated have a body that should have a 
> "User". But ideally any GET request should not have a "body". ANy 
> suggestions on how to deal with the situation. Or if anyone has used 
> swagger with dropwizard. 
>
>  
>
> @GET
> @Path(*"/all/{userName}/"*)
> @Produces(MediaType.*APPLICATION_JSON*)
> @ApiOperation(
> value = *"Journal Number"*,
> notes = *"Returns Journal Number for a company"*,
> response = GeneralLedger.*class*,
> authorizations = {@Authorization(value=*"basicAuth"*)})
> *public *Response classInfoForUsername
> (@Auth AuthenticatedUser user,
>  @PathParam(*"userName"*) String userName) {
>
> 
>
> }
>
>  
>
>  
>
>  
>
>  
>
> Swagger generated is :
>
>  
>
>  "/class/all/{userName}" : {
>
>   "get" : {
>
> "summary" : "Journal Number",
>
> "description" : "Returns Journal Number for a company",
>
> "operationId" : "classInfoForUsername",
>
> "consumes" : [ "application/json" ],
>
> "produces" : [ "application/json" ],
>
> "parameters" : [ {
>
>   "in" : "body",
>
>   "name" : "body",
>
>   "required" : false,
>
>   "schema" : {
>
> "$ref" : "#/definitions/AuthenticatedUser"
>
>   }
>
> }, {
>
>   "name" : "userName",
>
>   "in" : "path",
>
>   "required" : true,
>
>   "type" : "string"
>
> } ],
>
> "responses" : {
>
>   "default" : {
>
> "description" : "successful operation"
>
>   }
>
> },
>
> "security" : [ {
>
>   "basicAuth" : [ ]
>
> } ]
>
>   }
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to swagger-swaggersocket+unsubscr...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger Dropwizard Authentication

2017-10-09 Thread Ron Ratovsky
You can hide any generated parameter by adding the @ApiParam(hidden=true) 
annotation.

 

 

 

From:  on behalf of Piyush Mendhiratta 

Reply-To: "swagger-swaggersocket@googlegroups.com" 

Date: Monday, October 9, 2017 at 01:18
To: Swagger 
Subject: Swagger Dropwizard Authentication

 

I am trying to create swagger using the swaggerUI. My API framework uses 
dropwizard. Now when I am trying to use a GET resource with @Auth for 
authentication, swagger that is generated have a body that should have a 
"User". But ideally any GET request should not have a "body". ANy suggestions 
on how to deal with the situation. Or if anyone has used swagger with 
dropwizard. 

 

@GET
@Path("/all/{userName}/")
@Produces(MediaType.APPLICATION_JSON)
@ApiOperation(
    value = "Journal Number",
    notes = "Returns Journal Number for a company",
    response = GeneralLedger.class,
    authorizations = {@Authorization(value="basicAuth")})
public Response classInfoForUsername
    (@Auth AuthenticatedUser user,
 @PathParam("userName") String userName) {

}
 
 
 
 
Swagger generated is :
 
 "/class/all/{userName}" : {
  "get" : {
    "summary" : "Journal Number",
    "description" : "Returns Journal Number for a company",
    "operationId" : "classInfoForUsername",
    "consumes" : [ "application/json" ],
    "produces" : [ "application/json" ],
    "parameters" : [ {
  "in" : "body",
  "name" : "body",
      "required" : false,
  "schema" : {
    "$ref" : "#/definitions/AuthenticatedUser"
  }
    }, {
  "name" : "userName",
  "in" : "path",
  "required" : true,
  "type" : "string"
    } ],
    "responses" : {
  "default" : {
    "description" : "successful operation"
  }
    },
    "security" : [ {
  "basicAuth" : [ ]
    } ]
  }
-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Swagger (2.0) spec - response is zip with 1 JSON file inside - how to add JSON structure spec

2017-10-03 Thread Ron Ratovsky
I’m afraid there’s no way to describe that.

 

If you want to see support for this in the future, try filing a ticket at 
https://github.com/OAI/OpenAPI-Specification.

 

 

 

From:  on behalf of Ergya Russty 

Reply-To: "swagger-swaggersocket@googlegroups.com" 

Date: Tuesday, October 3, 2017 at 03:41
To: Swagger 
Subject: Swagger (2.0) spec - response is zip with 1 JSON file inside - how to 
add JSON structure spec

 

Hi Everyone,  

 

I am writing 2.0 spec for our services. We have 1 use case where the response 
is ZIP, inside the ZIP there is a JSON file. In general it is clear how to 
specify that the response is ZIP but I am curious whether it is possible to 
specify in 2.0 the "underlying" JSON structure even if the response itself is 
ZIP. Right now this is what I have:

 

...
  "/v2/super/secret/api": {

"get": {

"summary": "super secret api spec",

"produces": [

  "application/zip",

],

...

"responses": {

  "200": {

"description": "OK",

"schema": {

  "type": "file"

}

  },
...

 

In "normal" circumstances I have these if I want to specify the response JSON 
structure:

 

"200": {

"description": "OK",

"schema": {

  "$ref": "#/definitions/JsonRootSomething"

}

  },


Is it possible to somehow mix the two?

 

Thanks in advance

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


  1   2   3   4   >