diff --git a/README.md b/README.md index 321cc42679..7b3d5bc750 100644 --- a/README.md +++ b/README.md @@ -137,11 +137,13 @@ For full details of what is supported, it's worth checking out [the GoDoc for `c We also have [a JSON Schema](configuration-schema.json) that can be used by IDEs/editors with the Language Server Protocol (LSP) to perform intelligent suggestions, i.e.: ```yaml -# yaml-language-server: $schema=https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/HEAD/configuration-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.6.0/configuration-schema.json package: api # ... ``` +Note that it's recommended to pin to a specific version of the configuration schema, so it matches the version of `oapi-codegen` you're using. For instance, if you're using [Renovate](https://docs.renovatebot.com/), you can [have Renovate automagically update this version for you](https://www.jvt.me/posts/2026/03/01/oapi-codegen-config-renovate/). + ### Backwards compatibility Although we strive to retain backwards compatibility - as a project that's using a stable API per SemVer - there are sometimes opportunities we must take to fix a bug that could cause a breaking change for [people relying upon the behaviour](https://xkcd.com/1172/). diff --git a/renovate.json b/renovate.json index 3af37f23db..8ac4d6e63c 100644 --- a/renovate.json +++ b/renovate.json @@ -69,5 +69,18 @@ "executionMode": "branch" } } + ], + "customManagers": [ + { + "customType": "regex", + "managerFilePatterns": [ + "README.md" + ], + "matchStrings": [ + "# yaml-language-server: \\$schema=https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/(?[^/]+)/configuration-schema.json" + ], + "depNameTemplate": "github.com/oapi-codegen/oapi-codegen/v2", + "datasourceTemplate": "go" + } ] }