From 864ab564dc2fbfb849b7bd5fd1085a4feebb0678 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 15 Apr 2024 12:40:19 +0200 Subject: [PATCH] docs: rename OpenAPI to JSON Schema (#4020) Change-Id: I4d1dc3acdd1bd55ad94a12b441a44f087b2fc98f --- .mergify.yml | 2 +- plugins/remark-algolia.ts | 2 +- ...ion-openapi.json => mergify-configuration-schema.json} | 0 src/components/Tables/ActionOptionsTable.tsx | 2 +- src/components/Tables/ConfigOptions.tsx | 2 +- src/components/Tables/OptionsTable.tsx | 2 +- src/components/Tables/PullRequestAttributes.tsx | 2 +- src/content/docs/configuration/file-format.mdx | 8 ++++---- 8 files changed, 10 insertions(+), 10 deletions(-) rename public/{mergify-configuration-openapi.json => mergify-configuration-schema.json} (100%) diff --git a/.mergify.yml b/.mergify.yml index 66e2ac5ce2..6db74bfd63 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -63,7 +63,7 @@ queue_rules: - or: - and: - author=mergify-ci-bot - - head~=^openapi-spec-sync$ + - head~=^configuration-spec-sync$ - "title~=^chore: sync" - and: - author=mergify-ci-bot diff --git a/plugins/remark-algolia.ts b/plugins/remark-algolia.ts index 05de0c0dd3..15cc6d50b1 100644 --- a/plugins/remark-algolia.ts +++ b/plugins/remark-algolia.ts @@ -1,5 +1,5 @@ import { visit } from 'unist-util-visit'; -import configSchema from '../public/mergify-configuration-openapi.json'; +import configSchema from '../public/mergify-configuration-schema.json'; import { toString } from 'hast-util-to-string'; import algoliasearch from 'algoliasearch'; import type * as unified from 'unified'; diff --git a/public/mergify-configuration-openapi.json b/public/mergify-configuration-schema.json similarity index 100% rename from public/mergify-configuration-openapi.json rename to public/mergify-configuration-schema.json diff --git a/src/components/Tables/ActionOptionsTable.tsx b/src/components/Tables/ActionOptionsTable.tsx index f5d062e0fb..c269944e67 100644 --- a/src/components/Tables/ActionOptionsTable.tsx +++ b/src/components/Tables/ActionOptionsTable.tsx @@ -1,4 +1,4 @@ -import configSchema from '../../../public/mergify-configuration-openapi.json'; +import configSchema from '../../../public/mergify-configuration-schema.json'; import { OptionDefinition } from './ConfigOptions'; import { OptionsTableBase } from './OptionsTable'; diff --git a/src/components/Tables/ConfigOptions.tsx b/src/components/Tables/ConfigOptions.tsx index 9c018a8aad..bb89c7be73 100644 --- a/src/components/Tables/ConfigOptions.tsx +++ b/src/components/Tables/ConfigOptions.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import configSchema from '../../../public/mergify-configuration-openapi.json'; +import configSchema from '../../../public/mergify-configuration-schema.json'; import { renderMarkdown } from './utils'; // FIXME: move this to JSON schema? diff --git a/src/components/Tables/OptionsTable.tsx b/src/components/Tables/OptionsTable.tsx index 832df088a0..d9c2ad574b 100644 --- a/src/components/Tables/OptionsTable.tsx +++ b/src/components/Tables/OptionsTable.tsx @@ -1,6 +1,6 @@ import * as yaml from 'js-yaml'; -import configSchema from '../../../public/mergify-configuration-openapi.json'; +import configSchema from '../../../public/mergify-configuration-schema.json'; import { getValueType, OptionDefinition } from './ConfigOptions'; import { renderMarkdown } from './utils'; diff --git a/src/components/Tables/PullRequestAttributes.tsx b/src/components/Tables/PullRequestAttributes.tsx index e4d5e87b9f..8fba6840e2 100644 --- a/src/components/Tables/PullRequestAttributes.tsx +++ b/src/components/Tables/PullRequestAttributes.tsx @@ -1,4 +1,4 @@ -import configSchema from '../../../public/mergify-configuration-openapi.json'; +import configSchema from '../../../public/mergify-configuration-schema.json'; import { getValueType } from './ConfigOptions'; import { renderMarkdown } from './utils'; diff --git a/src/content/docs/configuration/file-format.mdx b/src/content/docs/configuration/file-format.mdx index dbe955ec25..bf5cebd322 100644 --- a/src/content/docs/configuration/file-format.mdx +++ b/src/content/docs/configuration/file-format.mdx @@ -155,16 +155,16 @@ Configuration Files](/configuration/sharing#extending-configuration-files). {/* */} -## OpenAPI Specification +## JSON Schema Specification For those interested in a more detailed and machine-readable description of the -Mergify configuration file format, an [OpenAPI](https://www.openapis.org/) +Mergify configuration file format, a [JSON Schema](https://json-schema.org/) specification is available. This specification can help you understand the structure of the configuration file and can be used to generate client libraries, server stubs, or API documentation. -You can find the -OpenAPI specification for the Mergify configuration here. +You can find the JSON +Schema specification for the Mergify configuration here. ## Validation and Troubleshooting