supamii / ah-swagger-plugin Goto Github PK
View Code? Open in Web Editor NEWGenerate Swagger-UI documentation from Actionhero
Home Page: https://www.npmjs.com/package/ah-swagger-plugin
License: MIT License
Generate Swagger-UI documentation from Actionhero
Home Page: https://www.npmjs.com/package/ah-swagger-plugin
License: MIT License
This package will no longer work with ActionHero v18+ https://github.com/actionhero/actionhero/releases/tag/18.0.0-beta.2
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
Hi!
We are making a new official actionhero Github team. This project is great... can we move it in?
A reminder
Based on your work, I changed to use a new swagger material ui. https://github.com/guiguan/ah-swagger-material-ui :)
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)
Required parameters are not checked
Hello!
We are now keeping a list of ActionHero plugins at https://www.actionherojs.com/plugins so the community can more easily find useful plugins. However, your plugin has not been updated to work with the latest version of ActionHero. Are you planning to do so? It would be awesome if you could!
Please join us on slack (https://slack.actionherojs.com) if you need any advice or help.
passing apiKey as header is not getting supported in swagger file upload
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.
This should be read from api.config.servers.websocket.clientJsPath
people like pretty pictures
not sure how to change schemes.
tried to add at swagger.js
config
schemes: ['https'],
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?
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
Here is all you need to do:
npm install ah-swagger-plugin --save
config/plugins.js
:exports['default'] = {
general: function(api){
return {
plugins: [ 'ah-swagger-plugin' ]
};
}
};
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
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.
If we have the route /api/data/{myparam} as well as /api/data?myparam=value, swagger docs will only display one or the other not both.
Parameter Type in swagger docs also reflect this confusion between query and path.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.