Skip to content

Add PostgreSQL database definition schemas - #657

Open
Nemanja Djuric (nemanja-djuric) wants to merge 3 commits into
mainfrom
dev/nedjuric/pgsql-manifest-schema
Open

Nemanja Djuric (nemanja-djuric) wants to merge 3 commits into
mainfrom
dev/nedjuric/pgsql-manifest-schema

Conversation

@nemanja-djuric

@nemanja-djuric Nemanja Djuric (nemanja-djuric) commented Oct 2, 2026 •

Copy link
Copy Markdown

Summary

Adds the definition schema package and documentation for the Microsoft Fabric PostgreSQLDatabase item in pgschema format, version 1.0.0: a Draft-07 schema for the decoded manifest.json part, an inline example, and descriptive definition-layout metadata.

Canonical manifest schema publication URL:
https://developer.microsoft.com/json-schemas/fabric/item/postgreSQLDatabase/definition/manifest/1.0.0/schema.json

These changes do not publish the artifacts live.

Changes

  • fabric/item/postgreSQLDatabase/definition/manifest/1.0.0/schema.json: a closed Draft-07 object requiring exactly three string properties: $schema, format, and version. The required $schema marker is a URI fixed to the canonical manifest schema identifier; format is fixed to "pgschema"; version is fixed to "1.0.0". Values are case-sensitive and additional properties are forbidden. The version also has a three-component, no-leading-zero pattern; its const still prevents other versions.
  • fabric/item/postgreSQLDatabase/definition/manifest/1.0.0/examples/inline.json: an example containing exactly those three required values.
  • fabric/item/postgreSQLDatabase/definitionStructure/1.0.0/definitionStructure.json: layout metadata using the common definition-structure schema, with root version: "1.0.0" and format: "pgschema". It records manifest.json and main.sql as required singletons (minCount: 1, maxCount: 1). Only the JSON manifest has a schemaRef. All SQL entries have type: "sql"; the eleven optional groups have minCount: 0 and no maximum count: types/*.sql, domains/*.sql, sequences/*.sql, functions/*.sql, procedures/*.sql, aggregates/*.sql, tables/*.sql, views/*.sql, materialized_views/*.sql, privileges/*.sql, and default_privileges/*.sql.
  • fabric/item/postgreSQLDatabase/README.md: documents the required schema marker, inline example, descriptor, and complete SQL-group inventory. Preserves the distinction between expanded Git files and the public definition.pgschema workload part (an InlineBase64 ZIP), the separate .platform metadata and REST definition.parts[] transport, and the independent manifest, generator, and platform-metadata version domains.
  • tests/validate-fabric-schemas_test.py: preserves the original gates for every existing schema. All JSON files retain JSON/reference checks; only the two explicitly named non-schema example/layout artifacts are excluded from schema-document metadata gates. Adds explicit coverage for the fixed manifest contract, version pattern, inline example, required singletons, and all eleven optional SQL groups.

Scope

  • The manifest schema validates only the parsed JSON manifest object. It does not validate SQL grammar or semantics, import/runtime behavior, dependency ordering, required filesystem or archive members, ZIP structure or safety, .platform, or the REST envelope.
  • The descriptor documents layout and cardinality. It is metadata, not a workload payload or an additional member of the expanded Git definition or workload ZIP. It does not prove SQL validity, import behavior, dependency ordering, or archive safety.
  • This alignment changes only the PostgreSQL definition artifacts, their directly related README, and the existing test runner. It does not modify other schemas, workload implementation, transport, or the definition version, and does not merge or promote anything to main or live.
  • The postgreSQLDatabase folder follows the existing lower-camel item-folder convention. The versioned definition/manifest path scopes the JSON schema to the manifest part rather than the complete bundle.

Validation

  • python -m pytest tests\validate-fabric-schemas_test.py -q -p no:cacheprovider: 611 passed, exit 0.
  • All 197 original schemas retain the original metadata/reference gates; JSON/reference checks cover all 199 JSON files, including the example and layout descriptor.
  • The three JSON artifacts match the approved package byte-for-byte after LF normalization, with no metadata adaptations. Exact-contract coverage verifies the fixed manifest values and every required/optional layout entry.
  • README links, manifest sample, and SQL-group inventory were checked against the artifacts. All five changed files are ASCII-compatible UTF-8, without BOM, with LF-only line endings and a trailing newline.

@nemanja-djuric Nemanja Djuric (nemanja-djuric) changed the title Add PostgreSQL database manifest-part schema Add PostgreSQL database definition schemas Oct 5, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant