Skip to content
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

Add json examples for material and asset files #29

Merged
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/validate-json.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Validate JSON schema files
# Source: https://github.com/nhalstead/validate-json-action
# Forked from: https://github.com/marketplace/actions/validate-json
name: Validate JSON schemas for assets and materials

on:
nakohdo marked this conversation as resolved.
Show resolved Hide resolved
push:
branches: [ main ]

jobs:
json-schema-validation:
name: JSON schema validation
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- name: Validate "asset" JSON schemas
uses: nhalstead/[email protected]
with:
schema: ./schemas/asset_schema.json
jsons: ./examples/*_asset.xoma
nakohdo marked this conversation as resolved.
Show resolved Hide resolved

- name: Validate "material" JSON schemas
uses: nhalstead/[email protected]
with:
schema: ./schemas/material_schema.json
jsons: ./examples/*_material.xomp
nakohdo marked this conversation as resolved.
Show resolved Hide resolved

17 changes: 17 additions & 0 deletions examples/example_asset.xoma
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"metadata": {
"copyright" : "(C) 2023-2024, Example Company",
"generator": "Blender",
"openmaterial_version": "1.0.0",
"creator": "Example Company",
"creation_date": "20240703T101728Z",
"asset_version": "1.0.0",
"id": "87769375a5109c689af8cc3ad3dd8349",
"name": "example_car",
"label": "vehicle",
"description": "Example car to demonstrate how OpenMATERIAL works"
},
"material_mapping": [
["10;50;255;127", "example_material.xomp"]
]
}
Loading