Skip to content

Commit

Permalink
Merge pull request #29 from asam-ev/28-add-json-examples-for-material…
Browse files Browse the repository at this point in the history
…-and-asset-files

Add json examples for material and asset files
  • Loading branch information
ClemensLinnhoff authored Aug 2, 2024
2 parents b2732e8 + 97f65b1 commit 4963802
Show file tree
Hide file tree
Showing 5 changed files with 900 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/validate-json.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# 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:
pull_request:
paths:
- 'examples/**'
- 'schemas/**'

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/*.xoma

- name: Validate "material" JSON schemas
uses: nhalstead/[email protected]
with:
schema: ./schemas/material_schema.json
jsons: ./examples/*.xomp

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", "metal with red paint"]
]
}
Loading

0 comments on commit 4963802

Please sign in to comment.