Skip to content

modify postprocess to support displaying resolved json schema for composite building blocks #61

@smrgeoinfo

Description

@smrgeoinfo

I'm assembling profiles from lots of pieces (see https://github.com/usgin/metadataBuildingBlocks), but the full schema displayed by bblocks-viewer shows all the $refs to building block components that are being assembled, making it difficult to figure out if the resolved schema that assembles all the pieces is doing what you want. A resolved schema is also useful for offline testing and validation instance documents using tools like Oxygen.

PR opengeospatial/bblocks-template#8 addresses this issue with python codes to generate resolved schema. Also includes a couple tools to generate JSON schema in parallel to the yaml-encoded json schema and check that the JSON and Yaml are equivalent. I'm a lot more comfortable reviewing and testing the JSON serialized schema.

To make the resolves schema visible in the BBlock view requires update to the bblock viewer code (see ogcincubator/bblocks-viewer#5),

This issue addresses the third step to make the resolved schema accessible via the bbtemplate and view-- update to the post processing workflow (Github action) in the Building Block Repository. The postprocess Docker tool generates annotated schemas in build/annotated/, but these still contain $ref references to remote URLs. Building block authors currently have no standard way to produce a fully-resolved, self-contained JSON Schema from their source files — useful for:

  • Local validation (e.g., jsonschema.validate(data, resolved_schema))
  • Tooling integration (e.g., JSON Forms, IDE schema support)
  • Inspection and debugging (single file, no external dependencies)

addressed by #62

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions