Skip to content

Improve generated json by JSONGenerator #7633

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 37 commits into from
Feb 28, 2025
Merged

Conversation

Efnilite
Copy link
Member

@Efnilite Efnilite commented Feb 20, 2025

Description

  • /sk gen-docs or the skriptGenerateDocumentation task can now be run without the templates. This results in only generating the json documentation.
  • Adds more data to the json file generated by JSONGenerator.
    • Requirements
    • Event-values
    • Cancellable
    • Deprecated
    • Keywords

This is prep work for the new docs at https://skript.efnilite.dev


Target Minecraft Versions: any
Requirements: none
Related Issues: #7625, SkriptLang/skript-docs#10, SkriptLang/skript-docs#37

@Efnilite Efnilite added enhancement Feature request, an issue about something that could be improved, or a PR improving something. documentation Related to Skript's official documentation. labels Feb 20, 2025
@Pikachu920
Copy link
Member

Made it so that when a value is null, it is not added to the json, to be more consistent with other attributes. Also saves space.

I'd prefer to add the null values so that all attributes are present. What do you think?

@Efnilite
Copy link
Member Author

Made it so that when a value is null, it is not added to the json, to be more consistent with other attributes. Also saves space.

I'd prefer to add the null values so that all attributes are present. What do you think?

that makes more sense actually, should be good now

@TheLimeGlass
Copy link
Contributor

Solves #7625

@Efnilite Efnilite requested a review from Pikachu920 February 23, 2025 12:03
@Efnilite Efnilite requested a review from sovdeeth February 24, 2025 09:25
Copy link
Member

@Pikachu920 Pikachu920 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. as a final thought, do you think we should add a formatVersion top level key that can be incremented when there are format changes? we can do a basic semver like 1.1

@sovdeeth
Copy link
Member

there also appear to be conflicts

@sovdeeth
Copy link
Member

Why are a bunch of test classes that shouldn't be loaded outside of tests now getting an additional check for testmode?

@Efnilite
Copy link
Member Author

Why are a bunch of test classes that shouldn't be loaded outside of tests now getting an additional check for testmode?

should be good now!

@Efnilite Efnilite merged commit 8bde953 into dev/patch Feb 28, 2025
5 checks passed
@Efnilite Efnilite deleted the patch/update-json-generator branch February 28, 2025 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Related to Skript's official documentation. enhancement Feature request, an issue about something that could be improved, or a PR improving something. patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants