question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support of prefixed schema extensions

See original GitHub issue

Hi there,

in order to better distinguish schema extensions from standardized keywords, I think it would make sense to add compliant alternative names. Thus, no old code needs to be changed and new code can clearly distinguish between schema and extension.

Looks like three key words are involved:

Name Prefixed Name
fieldsets x-field-sets
widget x-widget
visibleIf x-visible-if

(I hope the list is complete…)

The reason why I write this is that I want to create the schemas from Java POJOs (at first only out of curiosity). There it would be very unclean, in my opinion, to define such properties without a prefix there. If there is any interest in this topic, I will gladly report on it.

Moreover, I have unfortunately not found the code, which e.g. makes a { "widget": { "id": "string" } from { "widget": "string" }. I don’t know if I could do an implementation without help. Alternatively I could of course run a crappy recursive algorithm over the schema 😉

Thanks in advance!

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:17 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
daniele-pecoracommented, Aug 30, 2020

Support of prefixed schema extension came with commit d7c3d8f3dadf9a8bcbaa0ba004452efc28372b72 See also : https://stackblitz.com/edit/ngx-schema-form-customs-widgets-223?file=src/app/myform/schema-form.json

1reaction
daniele-pecoracommented, Aug 7, 2018

My 50 cent:

We keep ngx-schema-form json schema extension in a separate file.

We call this file schemaform.json.

At compile time the standard json schema and the schemaform.json get merged together. (There are plenty deep merge libs out there)

This is driven by the fact that mostly the standard json schema cames from the backend.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add custom data to resources using extensions - Microsoft Learn
First, you create your schema extension definition. Then, use it to extend supported resource instances with strongly-typed custom properties.
Read more >
An approach to working with Schema Extensions in the ...
Issues creating schema extensions using Graph Explorer ... First off I've created an ADAL app which will be used in my service application....
Read more >
Extending Stitched Schemas – GraphQL Tools
Schema extensions add gateway-level type definitions and resolvers into a combined API, which is useful for establishing connections between ...
Read more >
Schema extensions and custom attributes - IBM
Boolean; Integer; Case-sensitive string; Not case-sensitive string; Coordinated Universal Time (UTC) coded time. Prefix the attribute names with erPIM to easily ...
Read more >
Can I add specification extensions to my schema? - Open API
The spec allows x- prefixed extensions to the schema objects - sometimes called vendor extensions. I have been using the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found