Skip to content

Add doc references and add examples for <> values #400

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

Merged
merged 6 commits into from
Jul 3, 2023

Conversation

EmilyGraceSeville7cf
Copy link
Collaborator

@EmilyGraceSeville7cf EmilyGraceSeville7cf commented Jul 3, 2023

  • bashly
  • settings
  • strings
  • examples for completions property

Notes

Regex used to speed up adding doc references:

  • from: "title": "(.*)",\n(\s+)"description": "(.*)",
  • to: "title": "$1",\n$2"description": "$3\\nURL/#$1",

@EmilyGraceSeville7cf EmilyGraceSeville7cf added the enhancement New feature or request label Jul 3, 2023
@EmilyGraceSeville7cf EmilyGraceSeville7cf self-assigned this Jul 3, 2023
@EmilyGraceSeville7cf EmilyGraceSeville7cf marked this pull request as draft July 3, 2023 09:57
@DannyBen
Copy link
Member

DannyBen commented Jul 3, 2023

Do you prefer that I merge #399 so you have my latest schema?

@EmilyGraceSeville7cf
Copy link
Collaborator Author

Do you prefer that I merge #399 so you have my latest schema?

@DannyBen, yes, please.

@DannyBen
Copy link
Member

DannyBen commented Jul 3, 2023

Merged. Change as you wish.

@EmilyGraceSeville7cf EmilyGraceSeville7cf marked this pull request as ready for review July 3, 2023 10:54
@EmilyGraceSeville7cf EmilyGraceSeville7cf changed the title Add doc references Add doc references and add examples for <> values Jul 3, 2023
@EmilyGraceSeville7cf EmilyGraceSeville7cf marked this pull request as draft July 3, 2023 11:01
@DannyBen
Copy link
Member

DannyBen commented Jul 3, 2023

is there any list of all possible special values for completions property like <user>?

Yes.
https://github.com/DannyBen/completely#suggesting-files-directories-and-other-bash-built-ins

But - notice that there may be other possibilities that are not listed, since these types of strings are simply used differently. From the completely page (appears below that list):

For those interested in the technical details, any word between <...> will simply be added using the compgen -A action function, so you can in fact use any of its supported arguments.

So - if there is a way to suggest this list, but still allow any other <...> option - it is okay.

Let me know if wait or merge.

@EmilyGraceSeville7cf EmilyGraceSeville7cf marked this pull request as ready for review July 3, 2023 11:06
@EmilyGraceSeville7cf
Copy link
Collaborator Author

You can merge.

@DannyBen
Copy link
Member

DannyBen commented Jul 3, 2023

Nice. Thanks for this.

I wonder why JSON schema doesn't have a dedicated field for reference/documentation. Seems basic.

@DannyBen DannyBen merged commit e94a65f into master Jul 3, 2023
@DannyBen DannyBen deleted the feature/add-doc-refs-to-json-schemas branch July 3, 2023 11:19
@EmilyGraceSeville7cf
Copy link
Collaborator Author

EmilyGraceSeville7cf commented Jul 3, 2023

I wonder why JSON schema doesn't have a dedicated field for reference/documentation. Seems basic.

The same question. I think they can introduce something like documentation property for this purpose, but it will be useless for VS Code users until any extension supports it. As the goal it to show doc URL in key description and not to force user to open JSON schema and dig into it to just find out the right link for the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants