Comments (4)
I guess it's most probably because the swagger endpoint shouldn't be available in prod build files, maybe thats why it's throwing 500.
my fix would be to just omit /docs or /swagger-yml on build files.
from adonis-autoswagger.
Dupe of #75
Just fixed in 3.12.0
Edit: Oh... Sorry... your issue is totally different from the dupe I mentioned. You need to run the docs:generate
script as mentioned in the docs, to make it work in production.
from adonis-autoswagger.
did the same in the given steps in docs, the issue is same.
you can try the reproduceable repository which i added.
ENOENT: no such file or directory....
i dont know why it trying to access models & other folders without the js extension, if i remove the js extension it shows error for the next file
from adonis-autoswagger.
Is your NODE_ENV set to "production"?
If you did everything correctly, you should have a swagger.yml generated, which you MUST deploy to your production environment. On production, AutoSwagger will obviously not parse any js/ts files, but it will read the generated "swagger.yml" instead, and it should work.
Edit:
did the same in the given steps in docs, the issue is same. you can try the reproduceable repository which i added.
You clearly did not create the commands file for the generation as described in the Readme.
Please follow Readme and report back if it doesn't work
from adonis-autoswagger.
Related Issues (20)
- Bug: Problem when using the "Date" type HOT 2
- No such file or directory
- No such file or directory HOT 4
- Bug: Docs From Controllers Don't work when using inject() HOT 5
- Bug: Same Prefixed Method's Docs Conflict HOT 2
- Feat: Nesting Model Ref on Response HOT 10
- Feat: Cofigurable Interface Location HOT 2
- Document via decorators?
- No such file or directory HOT 4
- Scalar API Client Proxy Error HOT 5
- Feature Request: Add configure script HOT 2
- appPath: Not correct on controllers HOT 3
- Feature request: manual tag HOT 1
- Feature request: make requestFormDataBody support requestBody types HOT 9
- Token header with other type not Bearer HOT 4
- Production bug: trying to load different file HOT 1
- Question: How to Omit controller methods from the docs which doesn't exists HOT 1
- Documentation description? HOT 1
- Nested or extend interface not working with @responseBody HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adonis-autoswagger.