mashupbots / socko

A Scala web server powered by Netty networking and AKKA processing.
Other
255 stars 51 forks source link

Support for overriding swagger documentation gained from reflection by providing details in config file #70

Closed veebs closed 10 years ago

veebs commented 10 years ago

Overrides can be specified now be specified in your config file

      overrides {
        classes = [{
          name = TestOverrideClass
          description = Test Override Description
          properties = [{
            name = Property1
            type = Int
            description = Description of Property 1 
            required = true
          }]
        }]
      }      
dglick commented 10 years ago

I recently ported Socko to use the latest version of Swagger (1.3.2?) because I needed support for overriding the reflected classes with my own info and I saw that I needed a newer version of Swagger for that. After completing the port and overrides still not working, I discovered that Socko bypasses Swagger and does its own reflection when documenting the classes. So I modified Socko to support overrides.

I'd like to submit both changes for consideration, but I'm a noob with regard to GitHub so I'm not sure what the proper procedure is. If you'd be interested in these changes can I ask you what I should do? Also, I'm not sure if this is the best place to pose this question, so if I should be asking it elsewhere please let me know.

Thanks, David

veebs commented 10 years ago

This is the right place and thank you very much for offering to contribute the upgrade :-)

If you don't have the time for github, I will happily merge the changes for you.

Just zip up your source code, upload it on the net (maybe GoogleDrive, SkyDrive, DropBox, RapidShare, etc...) and post the link under this issue. I'll download it and do the rest.

Thanks again.

dglick commented 10 years ago

Ok, I've put it on GoogleDrive at https://drive.google.com/file/d/0B2GvUEoGLUjCbmFOOFJMeGYtWHM/edit?usp=sharing. Please be aware that for my own testing I've made changes to RestApp.scala and User.scala in the socko-examples project that you may not want to preserve... :-)

Also, for future reference what is the preferred way to submit changes?

David

veebs commented 10 years ago

The preferred way is via GitHub pull requests. It does make merging easier. Here's a link that may help: https://help.github.com/articles/fork-a-repo

Thanks very for this. I'll merge your changes when I get some time this weekend.