How to create jsdoc types from json schemas
Asked Answered
M

2

13

I have tons of json schema for node.js project. Can I use them in any way for:

  • Accessing them as jsdoc types from ".js" code files to increase webstorm intellisense accuracy
  • Or for creating jsdoc type definitions automatically

?

Middlebreaker answered 22/10, 2015 at 13:36 Comment(2)
Great idea. I've had similar thoughts as well. Unfortunately, I don't think there is anything out there like what you are looking for.Scout
@Jason, let's see what developers will write ;) I'm quite sure someone did something for this.Middlebreaker
P
2

I had the same question before and some time in 2017 created a json-schema-to-jsdoc utility in GitHub.

You can find it now in npm: https://www.npmjs.com/package/json-schema-to-jsdoc

Pasteurize answered 15/3, 2021 at 4:28 Comment(0)
E
1

The closest I have seen to what you suggest is VSCode's support for JSON Schema with regard to editing JSON files.

I would expect given they have started to support JSON Schema, that it would certainly be worth logging an issue with them regarding extending the capabilities of such support. If you did and let me know I would certainly support it!

Estovers answered 26/7, 2017 at 2:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.