Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using a Reference Input Type, show the Display Name instead of $ref #208

Closed
jhult opened this issue Oct 5, 2021 · 0 comments · Fixed by #212
Closed

When using a Reference Input Type, show the Display Name instead of $ref #208

jhult opened this issue Oct 5, 2021 · 0 comments · Fixed by #212
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@jhult
Copy link

jhult commented Oct 5, 2021

The $ref (e.g. #/definitions/el2) is somewhat ugly. It would be nicer to show the reference Display Name (title). Example:

  • Current: #/definitions/el2
  • Requested: Element 2

The Display Name might not be unique. So, you might still want/need to append part the reference Object Name after the Display Name. Example:

  • Current: #/definitions/el2
  • Requested: Element 2 - el2

Here is a brief video and the schema to go with it:

ref.mp4

Example:

{
  definitions: {
    el2: {
      title: 'Element 2',
      type: 'string',
      default: 'El 2 default'
    }
  },
  properties: {
    el2: {
      '$ref': '#/definitions/el2',
      title: 'Element 2 Override',
      description: ''
    }
  },
  dependencies: {},
  required: [],
  type: 'object'
}

Thanks for all your efforts in building and maintaining this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
2 participants