jsonsystems / json-schema

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

Keywords Starting With $ are Removed After Updating The Schema #99

Closed kkadir closed 3 years ago

kkadir commented 3 years ago

Steps to Reproduce

  1. Use any valid JSON to generate a schema.
  2. On the JSON Schema panel, switch to the Edit View.
  3. Click Edit on any element, i.e. root.
  4. Change any attribute, i.e. update the Required list.
  5. Click Save and switch back to the Code View.
  6. Observe that keywords like $schema, $id, and etc. do not exist anymore.

Screenshots Before editing anything, i.e. the required list: image

After saving the change (1 & 2) observe that the $schema and $id fields are gone (3): image

jackwootton commented 3 years ago

@kkadir Thank you for posting this in detail and with clear steps to recreate. I can confirm I can recreate this. I'll look at it this weekend and hopefully release a fix too. I will update this thread with my progress this weekend.

jackwootton commented 3 years ago

@kkadir This should now be fixed on www.jsonschema.net. Apologies for the delay in getting round to this.

kkadir commented 3 years ago

Thank you, seems to work now properly, closing this issue now!