Comments (5)
jsdoc-openapi
was what we originally called it. We switched to openapi-comment-parser
this is the only package we actively publish.
I think the issue is that we bundle this as commonjs, but I think we also bundle an es module version. Iβm honestly not too sure how to fix the bundling stuff though. This uses typescript so everything is using import
syntax, so I think fixing will just be a matter of tweaking the rollup config, or maybe we donβt even need rollup π€·ββοΈ
If you have any insights into this feel free to open a PR, otherwise Iβll do some research
from openapi-comment-parser.
@Ilchuk-Mihail we use import openapi from 'openapi-comment-parser'
in our project. If it's generating a spec, but it's empty, I'm guessing that it isn't able to properly calculate the appropriate directory. Have you tried using the cwd
option?
I've had issues with paths when using typescript. Setting cwd
to __dirname
normally fixes any issues for me:
const spec = openapi({ cwd: __dirname });
from openapi-comment-parser.
@bourdakos1 This option works and fixed spec generation. Thank you!
from openapi-comment-parser.
I've also tried jsdoc-openapi (seems to be also yours one) and it works there. Not sure why there are duplicated packages and what's more stable to use.
from openapi-comment-parser.
Any updates on this ?
Faced same issue:
import openapi from 'openapi-comment-parser'
- generate empty spec
const openapi = require('openapi-comment-parser')
- works correctly
from openapi-comment-parser.
Related Issues (20)
- There isn't a way to upload an array of files
- Handle streams?
- param examples have no effect on UI
- response examples aren't displayed
- haven't tested nested arrays
- request body table picks a random content-type
- the try it out button doesn't work for form images
- Add pagenation
- Generate md/swagger.yaml from comments? HOT 3
- Dynamic spec definitions HOT 2
- Integrating with input validation HOT 3
- Add support for "inline" objects in response and request body HOT 6
- How can I show an array of objects? HOT 13
- Request samples HOT 6
- File Type Support HOT 3
- warning 'Unnecessary type declaration' from `openapi/warnings` HOT 4
- Usage with NextJS
- Support for other languages
- check that schemas have been defined
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 openapi-comment-parser.