Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error importing #8

Closed
mvolkmann opened this issue Nov 29, 2020 · 4 comments
Closed

error importing #8

mvolkmann opened this issue Nov 29, 2020 · 4 comments

Comments

@mvolkmann
Copy link

I tried importing this library with:

import {swaggerDoc} from 'https://deno.land/x/deno_swagger_doc/mod.ts';

Just doing that in my code gives me the following errors when I run my server:

error: TS2339 [ERROR]: Property 'parse' does not exist on type '{}'.
  parser.parse(swaggerObject, (err : any, api : any) => {
         ~~~~~
    at https://deno.land/x/deno_swagger_doc@releasev1.0.0/lib/helpers/finalizeSpecificationObject.ts:38:10

TS2339 [ERROR]: Property 'safeLoad' does not exist on type '{}'.
        swaggerJsDocComments.push(jsYaml.safeLoad(tag.description));
                                         ~~~~~~~~
    at https://deno.land/x/deno_swagger_doc@releasev1.0.0/lib/helpers/filterJsDocComments.ts:19:42

TS2339 [ERROR]: Property 'safeLoad' does not exist on type '{}'.
    yaml.push(jsYaml.safeLoad(fileContent));
                     ~~~~~~~~
    at https://deno.land/x/deno_swagger_doc@releasev1.0.0/lib/helpers/parseApiFileContent.ts:19:22

TS2339 [ERROR]: Property 'parse' does not exist on type '{}'.
        const jsDocComment = doctrine.parse(regexResults[i], { unwrap: true });
                                      ~~~~~
    at https://deno.land/x/deno_swagger_doc@releasev1.0.0/lib/helpers/parseApiFileContent.ts:24:39
@chansdad
Copy link

How do we resolve this error? Any suggestions?

@bramirez96
Copy link

Still having this issue, unfortunately! I don't know enough about the way the import system works in these Deno packages otherwise I'd go ahead and make a PR. I do love OpenAPI, though, and would love to see this implementation working!

@antonplagemann
Copy link
Contributor

Just in case someone also encounters this:
You can try to add --no-check to the deno run command. This resolved the error in our project.

@singhcool
Copy link
Owner

HI @bramirez96 Just now we published the latest version. Please check it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants