Skip to content

Add json schema validation script - #411

Merged
spencer-lunarg merged 1 commit into
mainfrom
add-schema-validation
Sep 23, 2026
Merged

spencer-lunarg merged 1 commit into
mainfrom
add-schema-validation

Conversation

@christophe-lunarg

@christophe-lunarg christophe-lunarg commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Thanks to this script added, any layer project can validate the layer manifest settings with this simple CMake target:

# Copy the configured manifest JSON to the build directory and validate it against layers_settings_schema.json
add_custom_command(TARGET ProfilesLayer POST_BUILD
    COMMAND ${CMAKE_COMMAND} -E copy_if_different "${INTERMEDIATE_FILE}" "$<TARGET_FILE_DIR:ProfilesLayer>/${OUTPUT_FILE_FINAL_NAME}"
    COMMAND ${Python3_EXECUTABLE} "${VULKAN_UTILITY_LIBRARIES_INSTALL_DIR}/scripts/validate_json_manifest.py"
            "$<TARGET_FILE_DIR:ProfilesLayer>/${OUTPUT_FILE_FINAL_NAME}"
            "${VULKAN_UTILITY_LIBRARIES_INSTALL_DIR}/docs/layers_settings_schema.json"
            "${CMAKE_BINARY_DIR}"
    COMMENT "Validating ${OUTPUT_FILE_FINAL_NAME} against layers_settings_schema.json"
    VERBATIM
)

Used in KhronosGroup/Vulkan-Profiles#1001

And this is what it will look like when this PR will be merged:
KhronosGroup/Vulkan-Profiles#1002

@spencer-lunarg
spencer-lunarg merged commit 8904250 into main Sep 23, 2026
31 checks passed
@spencer-lunarg
spencer-lunarg deleted the add-schema-validation branch September 23, 2026 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants