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: <[email protected]> on behalf of Dale Christ 
<[email protected]>
Reply-To: "[email protected]" 
<[email protected]>
Date: Monday, May 7, 2018 at 14:12
To: Swagger <[email protected]>
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 [email protected].
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to