-
-
Notifications
You must be signed in to change notification settings - Fork 408
JSONGenerator for addons and docs.json
improvements
#8116
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docs.json
improvementsdocs.json
improvements
APickledWalrus
requested changes
Aug 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work here
Burbulinis
approved these changes
Aug 10, 2025
sovdeeth
requested changes
Aug 20, 2025
sovdeeth
reviewed
Aug 21, 2025
sovdeeth
approved these changes
Aug 21, 2025
APickledWalrus
requested changes
Aug 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking really good, just a few things
APickledWalrus
approved these changes
Aug 24, 2025
Co-authored-by: Patrick Miller <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
breaking changes
Pull or feature requests that contain breaking changes (API, syntax, etc.)
completed
The issue has been fully resolved and the change will be in the next Skript update.
documentation
Related to Skript's official documentation.
enhancement
Feature request, an issue about something that could be improved, or a PR improving something.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
docs.json
can only be generated for Skript.docs.json
.@Events
annotation do not follow thedocs.json
spec.Solution
The `docs.json` can only be generated for Skript.
JSONGenerator has been modified to allow creating an instance of JSONGenerator based on a SkriptAddon instance. To this extent, the `skriptVersion` property has been replaced with the `source` property.JSONGenerator also now uses the new Registration API to get all syntax registered by a specific addon.
Because this makes JSONGenerator not follow the DocumentationGenerator pattern, and since HTMLGenerator will soon be obselete, DocumentationGenerator has been deprecated, alongside
JSONGenerator#generate()
.The return types of expressions are not mentioned in `docs.json`.
A new `returns` property has been added to expressions which determine what types an expression can return. This is currently only limited expressions that have a constant return type (i.e. not dependent on the input of the expression).Events gathered from the `@Events` annotation do not follow the `docs.json` spec.
Given that the source events cannot be gathered from the contents of the `@Events` annotation, currently, the id of the event and the name of the event are the same. Given `@Events({"x", "y"})`, the resulting json code would be:This will be properly integrated when #7668 gets merged.
StructEvent does not have docs.
Added docs.Testing Completed
Manual testing.
Supporting Information
Breaking changes
2.0
.skriptVersion
property and replaced it with thesource
property, which details the addon that this file was generated from.@Events
annotation are now stored with an id and name, instead of as a plain string.returnType
property for functions to an array calledreturns
, similar to the newreturns
property on expressions.classes
array totypes
.Completes: #7680
Related: none