jsonsystems / json-schema

JSONSchema.Net Public Repository
Apache License 2.0
663 stars 64 forks source link

parse existing json schema #13

Closed graingert closed 6 years ago

graingert commented 6 years ago

Allow pasting and editing in the plain view

jackwootton commented 6 years ago

So, it will soon be possible load an existing schema so that it may be edited in the Edit View. Will that do? See screenshot below of a soon to be released (large) update...note the tabs in the LHS.

screenshot from 2018-06-05 23-02-10

graingert commented 6 years ago

Mainly I'd want to be able to edit the text of the JSON schema directly

jackwootton commented 6 years ago

But you could do that in the input tab on the LHS (just using the textarea, and then load it?). Unless I'm missing something here.

lmussier commented 6 years ago

@jackwootton can't wait to see this feature ! Any ETA on this hudge update ? :smiley:

jackwootton commented 6 years ago

It should be out this weekend. I'm currently testing and clearing technical debt. The initial version won't support all JSON schema attributes, but it will support everything currently generated by jsonschema.net.

@lmussier - are there any specific attributes, properties, or requirements you need in the schema parsing to make this initial release useful for you?

jackwootton commented 6 years ago

Deployment will, unfortunately, be pushed back to next weekend because a bug sucked-up my weekend. To make-up for this I'm keeping an old version of dev running this week: https://json-schema-dev.appspot.com

...it's not pretty because it's my development version, but it may have the functionality you need to save yourself some time.

I would be very grateful if you could post any bugs here.

lmussier commented 6 years ago

@jackwootton good news ! To answer to your previous question, for the moment I don't look for another feature, I'm quite new to json schema, your tool is very good for people like me 👍

lmussier commented 6 years ago

@jackwootton I little feedback on https://json-schema-dev.appspot.com usage. I think it might be better to have the schema load function on the edit (right hand side) side rather on the left side. I imagine the following: Importing a schema and edit it by hand in text mode or withe the wonderful UI. And on the left side we only have a json populated with random things, I don't know if it easy or even doable, but it's definitively a cool feature

psss commented 6 years ago

Looks like a nice feature. Will it be possible to load an existing schema by providing an URL as well? For example using the following link could directly open provided schema in edit mode:

https://jsonschema.net/?url=url_to_a_public_json_schema

This would be a very useful feature. The edit mode nicely shows the schema structure so it could be used for nicely visualizing existing schemas and experimenting with them.

jackwootton commented 6 years ago

Yes, but not with the initial update. A great idea, and one which others have requested too. Have you got some examples I can use to develop and test this feature?

psss commented 6 years ago

We are currently working on a Fedora CI messages specification that should use JSON schemas for the definition of how messages should look like:

https://pagure.io/fedora-ci/messages/blob/devel/f/schemas

Now I realized we will be using schema referencing as well to prevent duplication. Would that work with the editor as well?

jackwootton commented 6 years ago

This has been implemented in the new version. @psss - do you mind opening a new issue for loading by URL?

psss commented 6 years ago

Sure, filed as #19. Thanks.