The whole GBFS specification is not possible to represent statically in the JSON schema. The canonical validator has chosen to solve this by dynamically patching it in runtime, e.g. to solve dependencies between files. This is the same approach taken here:
Each Version instance may be instantiated with a map of custom-rule-lists-per-file. The rule is an implementation of the CustomRuleSchemaPatcher interface, which takes a schema document context and a map of the files being validated. The implementation may then return a modified version of the schema with dynamic rules added to it based on the files being validated.
The whole GBFS specification is not possible to represent statically in the JSON schema. The canonical validator has chosen to solve this by dynamically patching it in runtime, e.g. to solve dependencies between files. This is the same approach taken here:
Each Version instance may be instantiated with a map of custom-rule-lists-per-file. The rule is an implementation of the CustomRuleSchemaPatcher interface, which takes a schema document context and a map of the files being validated. The implementation may then return a modified version of the schema with dynamic rules added to it based on the files being validated.