--------------------------------------------
On Wed, 2/15/17, Richard Walker <[email protected]> wrote:

 Subject: Re: Swagger Java annotations for XML: (a) lists (b) namespaces (c) 
enums
 To: "Swagger" <[email protected]>
 Date: Wednesday, February 15, 2017, 4:01 AM
 
 On
 Wednesday, February 15, 2017 at 12:11:39 PM UTC+11, Richard
 Walker wrote:Issue #3: values of
 enumerated types.
 
 (Note:
 for JSON, the service (via Jackson) returns the values in
 uppercase, so the JSON Example Value is correct! Confusing,
 slightly annoying, and something I may want to do something
 about!)
 
 After a bit more experimenting, I was able to
 get the service itself to output JSON with the enum values
 in lowercase by overriding the default JSON serialization
 with my own ObjectMapper that has JaxbAnnotationModule
 applied. Now that only leaves what Swagger is doing.
 
 I tried the same
 "trick" as per the example at:
 
 https://github.com/swagger-api/swagger-core/issues/960#issuecomment-173330606
 
 The enum values in the
 generated swagger.json are still in uppercase.
 
 However, there was _another_
 effect: some _but not all_ of the object definitions now
 begin with lowercase. E.g.:
 
       "vocabulary" : {
          "required" : [
            
 "related-entity"
         
 ],
          "xml" : {
             "name" :
 "vocabulary"
         
 },
          "type" :
 "object",
       ...
 
 but:
 
       "Subject" : {
          "properties" : {
             "source" :
 {
               
 "xml" : {
                  
 "attribute" : true
                },
                "type" :
 "string"
            
 },
       ...
 
 The Subject class is defined/generated by xjc
 as Vocabulary.Subject, i.e. it's a static nested
 class.
 
 
 
 
 
 -- 
 
 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.
 u toate imperfectiunile care rezultau din politica de forta si dictat  
tratatele semnate cu tara noastra in anii 1919-1920 au reprezentat 
recunoasterea internationala a statului unitar roman  oferindu-i teoretic si 
garantiile necesare pentru mentinerea si consolidarea sa.

-- 
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