Giter VIP home page Giter VIP logo

ah-swagger-plugin's People

Contributors

asilvino avatar evantahler avatar sanmoy27 avatar supamii avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ah-swagger-plugin's Issues

Create the first release tag

Hello,

wouldn't be better/great to track the versions of the plugin?

I there any way to create the first release tag? (just an idea not really an issue)

How to upload a file using swagger

I am using ah-swagger plugin

modelSchema: {
file: {
type: 'file'
}
}

the option for choosing the file is not coming,

used the content-type as application/binary

pls help.

api.swagger.host assumes that configured port is public port

api.swagger.host includes the port, and appears to not have a config option to override the port that it gets from the server configuration.

While this is fine most of the time, if your API server is behind a reverse proxy or NAT firewall that changes the port that the public uses to reach the api server, all of the examples in swagger-ui are broken, and it displays an incorrect url for the action.

If a PR is needed, I would be happy to provide one.

https enable

not sure how to change schemes.
tried to add at swagger.js config

schemes: ['https'],

Set request headers

Hello,

I'm using passport library for the authentication and I would like to know how I can set a customer header for the token.
I've been looking but I still don't see how I can do that.

Thanks

question from sanmoy27

@sanmoy27

In post call I have there is a field named field1 which is mandatory to be provided in the body,which is mentioned as inputs field1:{required: true} but in swagger this input field is going as query parameter.
When I am mentioning it in model schema it is going in body as well as quey parameters.
I want to mention only in body not as query parameters

How do you exclude methods?

Currently it lists everything whether the api supports it or not.

get,post, etc..

Also, how do you limit the documentation to the ones that are configured in the routes?

install steps are confusing:

Here is all you need to do:

  • npm install ah-swagger-plugin --save
  • add the plugin to config/plugins.js:
exports['default'] = {
  general: function(api){
    return {
      plugins: [ 'ah-swagger-plugin' ]
    };
  }
};
  • add this plugin to the public paths listing so the static assets can be sourced:
// in `/config/api.js`

paths: {
        'action':      [ __dirname + '/../actions'      ] ,
        'task':        [ __dirname + '/../tasks'        ] ,
        'public':      [ 
          __dirname + '/../public', 
          __dirname + '/../node_modules/ah-swagger-plugin/public'       
        ] ,
        'pid':         [ __dirname + '/../pids'         ] ,
        'log':         [ __dirname + '/../log'          ] ,
        'server':      [ __dirname + '/../servers'      ] ,
        'initializer': [ __dirname + '/../initializers' ] ,
        'plugin':      [ __dirname + '/../node_modules' ] 
      },

You don't need a config/swagger.js if you are comfortable with the defaults. You also have the wrong content pasted in for the swagger config defaults

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.