Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

We have a common repo where all different projects share their common contract as json schemas. These schemas may be modified from time to time. How do I reference these schemas from inside my visual studio project without manually including their copies in my project?

Is it possible to wrap these schemas in a nuget package and include them?

question from:https://stackoverflow.com/questions/65930767/using-json-schema-from-another-repo

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
121 views
Welcome To Ask or Share your Answers For Others

1 Answer

Add the following to your JSON:

"$schema": "https://web.site/schema.json"

Obviously, change the URL. If your schema is on GitHub, open the file on the web in viewing mode, then click the "Raw" button.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...