Skip to content

Do something about the smart tags JSON schema #561

Open
@benjie

Description

@benjie

@singingwolfboy has prepared a draft: https://gist.github.com/singingwolfboy/a7144db4e24b5d31ba81f28b878a4b51

Would be great to integrate this with VSCode.

Relates to the smart tags plugin's JSON format:

/**
* JSON (or JSON5) description of the tags to add to various entities, e.g.
*
* ```js
* {
* version: 1,
* tags: {
* class: {
* my_table: {
* tags: {omit: "create,update,delete"},
* description: "You can overwrite the description too",
* columns: {
* my_private_field: {tags: {omit: true}}
* }
* },
* "my_schema.myOtherTable": {
* description: "If necessary, add your schema to the table name to prevent multiple being matched"
* }
* },
* procedure: {
* "my_schema.my_function_name": {
* tags: {sortable: true, filterable: true}
* }
* }
* }
* }
* ```
*/
export type JSONPgSmartTags = {
version: 1;
config: {
[kind in PgSmartTagSupportedKinds]: {
[identifier: string]: {
tags?: PgSmartTagTags;
description?: string;
columns?: {
[columnName: string]: {
tags?: PgSmartTagTags;
description?: string;
};
};
};
};
};
};

Used by PostGraphile in postgraphile.tags.json5: graphile/crystal#1177

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    🌳 Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions