-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
231 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://pgxn.org/meta/v2/module.schema.json", | ||
"title": "Module", | ||
"description": "An Extension represents a loadable module (a.k.a., shared library) that can be loaded into PostgreSQL.", | ||
"type": "object", | ||
"properties": { | ||
"type": { | ||
"enum": ["extension", "hook", "bgw"], | ||
"description": "The type of the module, one of \"extension\" for a module supporting a `CREATE EXTENSION` extension, \"bgw\" for a background worker, or \"hook\" for a hook." | ||
}, | ||
"lib": { | ||
"$ref": "path.schema.json", | ||
"description": "A path pointing to the pointing to the shared object file, without the suffix." | ||
}, | ||
"doc": { | ||
"$ref": "path.schema.json", | ||
"description": "A path pointing to the documentation file for the module, which **SHOULD** be more than a README." | ||
}, | ||
"abstract": { | ||
"type": "string", | ||
"description": "A short String value describing the module.", | ||
"minLength": 1 | ||
}, | ||
"preload": { | ||
"enum": ["server", "session"], | ||
"description": "A string indicating that the module requires loading before it can be used. A value of `server` means that the module requires loading on server start, while `session` means it can be loaded in a session. Omit this field if the module does not require preloading." | ||
} | ||
}, | ||
"required": ["type", "lib"], | ||
"patternProperties": { | ||
"^[xX]_.": { | ||
"description": "Custom key" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"examples": [ | ||
{ | ||
"type": "extension", | ||
"lib": "src/my_extension" | ||
}, | ||
{ | ||
"type": "bgw", | ||
"lib": "lib/my_bgw", | ||
"doc": "doc/my_bgw.md", | ||
"preload": "server", | ||
"abstract": "My background worker" | ||
}, | ||
{ | ||
"type": "hook", | ||
"lib": "lib/my_hook", | ||
"doc": "doc/my_hook.md", | ||
"preload": "session", | ||
"abstract": "My hook" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters