]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Complete the transition from Swagger to OpenAPI 17127/head
authorKevin P. Fleming <kevin@km6g.us>
Thu, 9 Apr 2026 11:28:49 +0000 (07:28 -0400)
committerKevin P. Fleming <kevin@km6g.us>
Thu, 9 Apr 2026 11:32:50 +0000 (07:32 -0400)
Remove one remaining reference to Swagger in the documentation, and
rename the API schema file to use 'openapi' instead of
'swagger'. These are all internal (build system and other) changes and
should have no effect on users.

Signed-off-by: Kevin P. Fleming <kevin@km6g.us>
33 files changed:
.github/actions/problem-matchers/basic.json
.github/actions/spell-check/excludes.txt
.github/workflows/build-and-test-all.yml
configure.ac
docs/.gitignore
docs/Makefile.am
docs/Makefile.sphinx
docs/conf.py
docs/http-api/autoprimaries.rst
docs/http-api/cache.rst
docs/http-api/cryptokey.rst
docs/http-api/index.rst
docs/http-api/metadata.rst
docs/http-api/networks.rst
docs/http-api/openapi/authoritative-api-openapi.yaml [moved from docs/http-api/swagger/authoritative-api-swagger.yaml with 100% similarity]
docs/http-api/openapi/spectral-ruleset.yaml [moved from docs/http-api/swagger/spectral-ruleset.yaml with 100% similarity]
docs/http-api/search.rst
docs/http-api/server.rst
docs/http-api/statistics.rst
docs/http-api/tsigkey.rst
docs/http-api/views.rst
docs/http-api/zone.rst
lgtm.yml
meson.build
pdns/.gitignore
pdns/Makefile.am
pdns/generate-api-openapi.py [moved from pdns/generate-api-swagger.py with 82% similarity]
pdns/recursordist/docs/Makefile.sphinx
pdns/recursordist/docs/http-api/authoritative-api-openapi.yaml [new symlink]
pdns/recursordist/docs/http-api/authoritative-api-swagger.yaml [deleted symlink]
pdns/recursordist/meson.build
pdns/ws-auth.cc
tasks.py

index 336f0f567e55b9ef7084863ce3a3220d9ee93c78..5e78030bc34f31d574612e4a632c97fc7bb7d386 100644 (file)
             ]
         },
         {
-            "owner": "pdns-swagger",
+            "owner": "pdns-openapi",
             "severity": "error",
             "pattern": [
                 {
-                    "regexp": "(docs/http-api/swagger/.*\\.yaml)$",
+                    "regexp": "(docs/http-api/openapi/.*\\.yaml)$",
                     "file": 1
                 },
                 {
index 587a8e61fbf95b27bd16bdaa55bd9996775081ff..accfafc2e7c7b16a4c6df6d3dcefc448b9ee2e83 100644 (file)
@@ -94,7 +94,7 @@ SUMS$
 ^codedocs/doxygen\.conf$
 ^docs/depfile\.py$
 ^docs/http-api/tsigkey\.rst$
-^docs/http-api/swagger/spectral-ruleset\.yaml$
+^docs/http-api/openapi/spectral-ruleset\.yaml$
 ^docs/lua-records/reference/index\.rst$
 ^modules/remotebackend/example\.rb$
 ^modules/remotebackend/test-remotebackend-keys\.hh$
index 8d2979b932b56c60e7b3f0765cad2499ef141394..5ff2ed38becbf2930188ab19dd7e1bf14523aa70 100644 (file)
@@ -846,7 +846,7 @@ jobs:
           allow-empty: true
           fail-on-error: false
 
-  swagger-syntax-check:
+  openapi-syntax-check:
     if: ${{ (!github.event.schedule || vars.SCHEDULED_JOBS_BUILD_AND_TEST_ALL) && ! contains(needs.get-runner-container-image.outputs.id, 'debian-11') }}
     runs-on: ubuntu-24.04
     needs:
@@ -868,15 +868,15 @@ jobs:
         with:
           venv-parent: ${{ env.REPO_HOME }}
           working-directory: .
-      - run: ${{ env.INV_CMD }} install-swagger-tools
-      - run: ${{ env.INV_CMD }} swagger-syntax-check
+      - run: ${{ env.INV_CMD }} install-openapi-tools
+      - run: ${{ env.INV_CMD }} openapi-syntax-check
 
   collect:
     needs:
       - build-auth
       - build-dnsdist
       - build-recursor
-      - swagger-syntax-check
+      - openapi-syntax-check
       - test-auth-api
       - test-auth-backend
       - test-dnsdist-regression
index fd895ba601af35b081c2c9b4148c9a4572fc31bf..7e2d2adebf2ed61685a5b9195ba89d40d56be672 100644 (file)
@@ -129,8 +129,8 @@ PDNS_WITH_SQLITE3
 
 PDNS_CHECK_PYTHON_VENV
 
-AM_CONDITIONAL([HAVE_API_SWAGGER_JSON], [test -e "$srcdir/pdns/api-swagger.json"])
-AM_COND_IF([HAVE_API_SWAGGER_JSON],[],[
+AM_CONDITIONAL([HAVE_API_OPENAPI_JSON], [test -e "$srcdir/pdns/api-openapi.json"])
+AM_COND_IF([HAVE_API_OPENAPI_JSON],[],[
   AM_COND_IF([HAVE_VENV],[],[
     AC_MSG_ERROR([Python 3 and/or venv module are not available, Authoritative Server cannot be built.])
   ])
index 068ae60c575ba54e0597a12a42a29f5bca49ac0a..657ea6069ffaa3039f17e75ba2c59b06e65af9a5 100644 (file)
@@ -19,6 +19,6 @@ html-docs.tar.bz2
 /mans
 /mans.tmp
 /_build
-/http-api/swagger/authoritative-api-schema.yaml
+/http-api/openapi/authoritative-api-schema.yaml
 /sphinx.d
 /sphinx.stamp
index c848dc3d360176c02114127c17b26697c960d899..aedd381bb763dd552530e79bc6dd35233c65b1fe 100644 (file)
@@ -51,7 +51,7 @@ man_MANS = $(MANPAGES_INSTALL)
 
 EXTRA_DIST = \
        $(MANPAGES_DIST) \
-       http-api/swagger/authoritative-api-swagger.yaml
+       http-api/openapi/authoritative-api-openapi.yaml
 
 if HAVE_VENV
 if !HAVE_MANPAGES
@@ -88,13 +88,13 @@ if !HAVE_MANPAGES
 endif
        rm -rf mans
 
-http-api/swagger/authoritative-api-schema.yaml: .venv generate-jsonschema.py http-api/swagger/authoritative-api-swagger.yaml
-       .venv/bin/python ./generate-jsonschema.py http-api/swagger/authoritative-api-swagger.yaml $@
+http-api/openapi/authoritative-api-schema.yaml: .venv generate-jsonschema.py http-api/openapi/authoritative-api-openapi.yaml
+       .venv/bin/python ./generate-jsonschema.py http-api/openapi/authoritative-api-openapi.yaml $@
 
-html-docs: common/** manpages/** .venv *.rst http-api/swagger/authoritative-api-schema.yaml
+html-docs: common/** manpages/** .venv *.rst http-api/openapi/authoritative-api-schema.yaml
        .venv/bin/python -msphinx -b html . html-docs
 
-latex/PowerDNS-Authoritative.pdf: common/** manpages/** .venv *.rst http-api/swagger/authoritative-api-schema.yaml
+latex/PowerDNS-Authoritative.pdf: common/** manpages/** .venv *.rst http-api/openapi/authoritative-api-schema.yaml
        .venv/bin/python -msphinx -M latexpdf . .
 
 PowerDNS-Authoritative.pdf: latex/PowerDNS-Authoritative.pdf
index 9d0426e30218aa0f0711c0d654688dc3ae17d90b..56297ee173b527d5a069c04f9693948f2e58e956 100644 (file)
@@ -12,14 +12,14 @@ BUILDDIR      = _build
 help: .venv
        @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
 
-.PHONY: help Makefile.sphinx generate-jsonschema.py http-api/swagger/authoritative-api-swagger.yaml
+.PHONY: help Makefile.sphinx generate-jsonschema.py http-api/openapi/authoritative-api-openapi.yaml
 
-http-api/swagger/authoritative-api-schema.yaml: .venv generate-jsonschema.py http-api/swagger/authoritative-api-swagger.yaml
-       .venv/bin/python ./generate-jsonschema.py http-api/swagger/authoritative-api-swagger.yaml $@ 
+http-api/openapi/authoritative-api-schema.yaml: .venv generate-jsonschema.py http-api/openapi/authoritative-api-openapi.yaml
+       .venv/bin/python ./generate-jsonschema.py http-api/openapi/authoritative-api-openapi.yaml $@ 
 
 # Catch-all target: route all unknown targets to Sphinx using the new
 # "make mode" option.  $(O) is meant as a shortcut for $(SPHINXOPTS).
-%: Makefile.sphinx .venv http-api/swagger/authoritative-api-schema.yaml 
+%: Makefile.sphinx .venv http-api/openapi/authoritative-api-schema.yaml 
        @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
 
 .venv:
index dca3258c4333c20cf827bfe2e40da39dfc6df3f2..f21a57b010e37c1363b168a996c2aca58c0aa509 100644 (file)
@@ -126,7 +126,7 @@ changelog_inner_tag_sort = [
 changelog_hide_tags_in_entry = True
 
 # -- Options for the Sphinx-Immaterial JSON Domain ------------------------
-json_schemas = ["http-api/swagger/authoritative-api-schema.yaml"]
+json_schemas = ["http-api/openapi/authoritative-api-schema.yaml"]
 
 # -- Options for the HTTP Domain ------------------------
 # Because we use 'default' in the OpenAPI definition for responses, the HTTP domain
@@ -174,7 +174,7 @@ redoc = [
     {
         "name": "PowerDNS Authoritative API",
         "page": "http-api/redoc",
-        "spec": "http-api/swagger/authoritative-api-swagger.yaml",
+        "spec": "http-api/openapi/authoritative-api-openapi.yaml",
         "embed": True,
         "opts": {
             "native-scrollbars": True,
index d92f0932003ddd7d1b4ff5448fd04d794b0a4258..e557d5888ad2657dcb0041bd983f53cf1b396725 100644 (file)
@@ -6,7 +6,7 @@ This API is used to manage :ref:`autoprimaries <autoprimary-operation>`.
 Autoprimary endpoints
 ---------------------
 
-.. openapi:: swagger/authoritative-api-swagger.yaml
+.. openapi:: openapi/authoritative-api-openapi.yaml
   :paths: /servers/{server_id}/autoprimaries /servers/{server_id}/autoprimaries/{ip}/{nameserver}
   :examples:
 
index 755cdf00ac7e2e21263dcca5352dd27bd051fa68..e4ec07edd6944894db6cec2c261264bba8821837 100644 (file)
@@ -3,7 +3,7 @@ Cache
 
 Endpoints
 ---------
-.. openapi:: swagger/authoritative-api-swagger.yaml
+.. openapi:: openapi/authoritative-api-openapi.yaml
   :paths: /servers/{server_id}/cache/flush
   :examples:
 
index b2553fd5d78313dc23cd64e53ff41cf5dda2de82..8b46ca696dc15958029ae98d31c09228d0d96041 100644 (file)
@@ -4,7 +4,7 @@ Allows for modifying DNSSEC key material via the API.
 
 Endpoints
 ---------
-.. openapi:: swagger/authoritative-api-swagger.yaml
+.. openapi:: openapi/authoritative-api-openapi.yaml
   :paths: /servers/{server_id}/zones/{zone_id}/cryptokeys /servers/{server_id}/zones/{zone_id}/cryptokeys/{cryptokey_id}
   :examples:
 
index 3fda68cd99e9e0284cc9271a8a150717a555ec24..3325f3459210addf7deca6ae7fdaf762c4e9c03b 100644 (file)
@@ -319,8 +319,8 @@ Working with the API
 
 This chapter describes the PowerDNS Authoritative API.
 When creating an API wrapper (for instance when fronting multiple API's), it is recommended to stick to this API specification.
-The API is described in the `OpenAPI format <https://www.openapis.org/>`_, also known as "Swagger", and this description is `available <https://raw.githubusercontent.com/PowerDNS/pdns/master/docs/http-api/swagger/authoritative-api-swagger.yaml>`_. It can also be obtained from a running server if the administrator of that server has enabled the API; it
-is available at the  `/api/docs` endpoint in both YAML and JSON formats (the 'Accept' header can be used to indicate the
+The API is described in the `OpenAPI 3.1 format <https://www.openapis.org/>`_, and this description is `available <https://raw.githubusercontent.com/PowerDNS/pdns/master/docs/http-api/openapi/authoritative-api-openapi.yaml>`_. It can also be obtained from a running server if the administrator of that server has enabled the API; it
+is available at the `/api/docs` endpoint in both YAML and JSON formats (the 'Accept' header can be used to indicate the
 desired format).
 
 Authentication
index 1664c51b364c2f18ac8061911bdaa45c652279f0..918a1515b7b6107ed0a51874a5b36146201d5c9b 100644 (file)
@@ -3,7 +3,7 @@ Metadata
 
 Endpoints
 ---------
-.. openapi:: swagger/authoritative-api-swagger.yaml
+.. openapi:: openapi/authoritative-api-openapi.yaml
   :paths: /servers/{server_id}/zones/{zone_id}/metadata /servers/{server_id}/zones/{zone_id}/metadata/{metadata_kind}
   :examples:
 
index 81341b2b5c902a41e1258d23fef946617ba13100..d14cf9d9e64a513c1fb7acc022cc7b51e37ae69b 100644 (file)
@@ -6,7 +6,7 @@ These endpoints allow configuration of networks, used by :doc:`../views`.
 Networks Endpoints
 ------------------
 
-.. openapi:: swagger/authoritative-api-swagger.yaml
+.. openapi:: openapi/authoritative-api-openapi.yaml
   :paths: /servers/{server_id}/networks /servers/{server_id}/networks/{ip}/{prefixlen}
   :examples:
 
index 3c22d9a3c37829289efbbb119d05be4dff2fa92e..6897ba8d78c0c6f85899855b8e0de014d64ef62e 100644 (file)
@@ -11,7 +11,7 @@ The API allows searching for data in :json:schema:`Zones <Zone>`, :json:schema:`
 Endpoints
 ---------
 
-.. openapi:: swagger/authoritative-api-swagger.yaml
+.. openapi:: openapi/authoritative-api-openapi.yaml
   :paths: /servers/{server_id}/search-data
   :examples:
 
index 64aa7b6d42f7599f83b6f6129c536b9cdede7dac..2b5cb731c9e7f16b856adcac8e4db7f13a11b82a 100644 (file)
@@ -8,7 +8,7 @@ However, the API is written in a way that a proxy could be in front of many serv
 Endpoints
 ---------
 
-.. openapi:: swagger/authoritative-api-swagger.yaml
+.. openapi:: openapi/authoritative-api-openapi.yaml
   :paths: /servers /servers/{server_id}
   :examples:
 
index 568bded97ef3d26be3a2295b2e7757a379d5b1e3..0176fd6755b6cd186ae82b2983e39d2f6b47a2b9 100644 (file)
@@ -4,7 +4,7 @@ Statistics
 Endpoints
 ---------
 
-.. openapi:: swagger/authoritative-api-swagger.yaml
+.. openapi:: openapi/authoritative-api-openapi.yaml
   :paths: /servers/{server_id}/statistics
   :examples:
 
index 4d5e45883a5fb7f1d5fa0668f41a8fefc8dd2054..b4c94accf55aa5b8c50fe5e3d455f400c9f04455 100644 (file)
@@ -7,7 +7,7 @@ TSIGKeys can be manipulated via the API.
 TSIGKey Endpoints
 -----------------
 
-.. openapi:: swagger/authoritative-api-swagger.yaml
+.. openapi:: openapi/authoritative-api-openapi.yaml
   :paths: /servers/{server_id}/tsigkeys /servers/{server_id}/tsigkeys/{tsigkey_id}
   :examples:
 
index 8744977aa768f4980bbfb39e2a790cc00dc9b3c9..e04b08db3c2e357f643ecd779369e9e2ba7efa5b 100644 (file)
@@ -6,7 +6,7 @@ These endpoints allow configuration of per-zone :doc:`../views`.
 Views Endpoints
 ---------------
 
-.. openapi:: swagger/authoritative-api-swagger.yaml
+.. openapi:: openapi/authoritative-api-openapi.yaml
   :paths: /servers/{server_id}/views /servers/{server_id}/views/{view} /servers/{server_id}/views/{view}/{id}
   :examples:
 
index 32307f341a3fa82a623d6fbf1ed7d2f6c4e40f9d..99e69b4188ffbff741197dff02743d80996d93fd 100644 (file)
@@ -6,7 +6,7 @@ Manipulating zones is the primary use of the API.
 Zone Endpoints
 --------------
 
-.. openapi:: swagger/authoritative-api-swagger.yaml
+.. openapi:: openapi/authoritative-api-openapi.yaml
   :paths: /servers/{server_id}/zones /servers/{server_id}/zones/{zone_id} /servers/{server_id}/zones/{zone_id}/axfr-retrieve /servers/{server_id}/zones/{zone_id}/notify /servers/{server_id}/zones/{zone_id}/export /servers/{server_id}/zones/{zone_id}/rectify
   :examples:
 
index 67929165e2586cf814b823bddcfb3a1d28cfdf93..1048b73c24c6402bbf4585d33b112cc18a2d3a08 100644 (file)
--- a/lgtm.yml
+++ b/lgtm.yml
@@ -24,7 +24,7 @@ extraction:
       - "autoreconf -vi"
       - "./configure --with-modules='bind gsqlite3 gmysql gpgsql ldap'"
       - "pushd pdns"
-      - "touch .venv api-swagger.yaml api-swagger.json"
+      - "touch .venv api-openapi.yaml api-openapi.json"
       - "popd"
     index:
       build_command:
index d9f1a60902ed8de60c4d3eab3f3faf15242a0ba3..9c718005903c334f1b9e2a43ff2d39fe19947c3f 100644 (file)
@@ -359,21 +359,21 @@ if not fs.is_file(libpdns_dnslabeltext_gen)
   libpdns_dnslabeltext_gen = ragel_generator.process(libpdns_dnslabeltext_source)
 endif
 
-libpdns_apidocfiles_source = 'docs' / 'http-api' / 'swagger' / 'authoritative-api-swagger.yaml'
+libpdns_apidocfiles_source = 'docs' / 'http-api' / 'openapi' / 'authoritative-api-openapi.yaml'
 libpdns_apidocfiles_gen    = src_dir / 'apidocfiles.h'
-generate_api_swagger_py    = src_dir / 'generate-api-swagger.py'
+generate_api_openapi_py    = src_dir / 'generate-api-openapi.py'
 if not fs.is_file(libpdns_apidocfiles_gen)
   py = import('python')
   python = py.find_installation('python3', modules: 'yaml', required: true)
 
-  summary('Python', python.found(), bool_yn: true, section: 'Swagger API')
-  summary('Path', python.full_path(), section: 'Swagger API')
-  summary('Version', python.version(), section: 'Swagger API')
+  summary('Python', python.found(), bool_yn: true, section: 'Openapi API')
+  summary('Path', python.full_path(), section: 'Openapi API')
+  summary('Version', python.version(), section: 'Openapi API')
 
   libpdns_apidocfiles_gen = custom_target(
     'pdns-apidocfiles-h',
     command: [python, '@INPUT0@', '@INPUT1@'],
-    input: [generate_api_swagger_py, libpdns_apidocfiles_source],
+    input: [generate_api_openapi_py, libpdns_apidocfiles_source],
     output: 'apidocfiles.h',
     capture: true,
   )
@@ -1186,13 +1186,13 @@ endif
 if python.found()
   json_schema = custom_target(
     'auth-json-schema',
-    input: product_source_dir / docs_dir / 'http-api' / 'swagger' / 'authoritative-api-swagger.yaml',
+    input: product_source_dir / docs_dir / 'http-api' / 'openapi' / 'authoritative-api-openapi.yaml',
     output: 'auth-schema-generated.stamp',
     command: [
       python,
       product_source_dir / docs_dir / 'generate-jsonschema.py',
       '@INPUT@',
-      product_source_dir / docs_dir / 'http-api' / 'swagger' / 'authoritative-api-schema.yaml',
+      product_source_dir / docs_dir / 'http-api' / 'openapi' / 'authoritative-api-schema.yaml',
       '--stampfile',
       '@OUTPUT@'
     ],
index e00ce9a04b2247c5792a5689a3c0e4e4dd9b9310..36e6127d0949b9703ab768de1780c3ea9086ca67 100644 (file)
@@ -54,10 +54,10 @@ version_generated.h
 /calidns
 /dumresp
 /apidocfiles.h
-/api-swagger.yaml
-/api-swagger.json
+/api-openapi.yaml
+/api-openapi.json
 /.venv
-/.swagger-api-venv
+/.openapi-api-venv
 effective_tld_names.dat
 /dnsmessage.pb.cc
 /dnsmessage.pb.h
index 67665ba2813999000bbe4fb8318bdffe42a03876..bd1db64ff66c71c8499e58e3d6f5c67e1538a486 100644 (file)
@@ -46,14 +46,14 @@ AM_CPPFLAGS +=$(LIBSODIUM_CFLAGS)
 endif
 
 EXTRA_DIST = \
-       api-swagger.json \
-       api-swagger.yaml \
+       api-openapi.json \
+       api-openapi.yaml \
        bindparser.hh \
        convert-yaml-to-json.py \
        dnslabeltext.cc \
        dnslabeltext.rl \
        dnsmessage.proto \
-       generate-api-swagger.py \
+       generate-api-openapi.py \
        incfiles \
        inflighter.cc \
        ixfrdist.example.yml \
@@ -84,34 +84,34 @@ CLEANFILES = \
        pdns.conf-dist \
        apidocfiles.h
 
-if !HAVE_API_SWAGGER_JSON
+if !HAVE_API_OPENAPI_JSON
 # don't clean these files if they were present
 # at 'configure' time (e.g. from a source dist)
 CLEANFILES += \
-       api-swagger.yaml \
-       api-swagger.json
+       api-openapi.yaml \
+       api-openapi.json
 endif
 
 # use a $(wildcard) wrapper here to allow build to proceed if output
 # file is present but input file is not (e.g. in a dist tarball)
-api-swagger.yaml: $(wildcard ${srcdir}/../docs/http-api/swagger/authoritative-api-swagger.yaml)
+api-openapi.yaml: $(wildcard ${srcdir}/../docs/http-api/openapi/authoritative-api-openapi.yaml)
        cp $< $@
 
 if HAVE_VENV
-api-swagger.json: api-swagger.yaml requirements.txt
+api-openapi.json: api-openapi.yaml requirements.txt
        $(PYTHON) -m venv .venv
        .venv/bin/pip install -U pip "setuptools<82"
        .venv/bin/pip install -r ${srcdir}/requirements.txt
        .venv/bin/python ${srcdir}/convert-yaml-to-json.py $< $@
 else # if HAVE_VENV
-if !HAVE_API_SWAGGER_JSON
-api-swagger.json:
+if !HAVE_API_OPENAPI_JSON
+api-openapi.json:
        echo "You need Python 3 and the 'venv' module to generate the JSON API document"
        exit 1
 endif
 endif
 
-apidocfiles.h: api-swagger.yaml api-swagger.json
+apidocfiles.h: api-openapi.yaml api-openapi.json
        $(AM_V_GEN)$(srcdir)/incfiles $^ > $@.tmp
        @mv $@.tmp $@
 
similarity index 82%
rename from pdns/generate-api-swagger.py
rename to pdns/generate-api-openapi.py
index 5371976f773683e87d1d8603b66ccaad5693e809..7be76b74300ae3a5af6acf005bf3d39df8da5c9d 100644 (file)
@@ -1,4 +1,4 @@
-"""Produce API swagger YAML and JSON representations usable from C."""
+"""Produce API OpenAPI YAML and JSON representations usable from C."""
 
 import json
 import sys
@@ -35,8 +35,8 @@ with open(yaml_filename, mode="r", encoding="utf-8") as f_in:
     print(header)
     print()
 
-    dump_hex(yaml_contents, "api_swagger_yamlData", "g_api_swagger_yaml")
+    dump_hex(yaml_contents, "api_openapi_yamlData", "g_api_openapi_yaml")
     print()
     print("// -----------------------------------------------------------")
     print()
-    dump_hex(json_contents, "api_swagger_jsonData", "g_api_swagger_json")
+    dump_hex(json_contents, "api_openapi_jsonData", "g_api_openapi_json")
index 2d90fd238e95b90681f75f9e1ceba5e33479ced4..c577e33e9cfe07e1e0bc545d2a8b9daa96364d20 100644 (file)
@@ -12,10 +12,10 @@ BUILDDIR      = _build
 help: .venv
        @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
 
-.PHONY: help Makefile.sphinx generate-jsonschema.py http-api/authoritative-api-swagger.yaml
+.PHONY: help Makefile.sphinx generate-jsonschema.py http-api/authoritative-api-openapi.yaml
 
-http-api/recursor-generated-schema.yaml: .venv generate-jsonschema.py http-api/authoritative-api-swagger.yaml
-       .venv/bin/python ./generate-jsonschema.py http-api/authoritative-api-swagger.yaml $@ 
+http-api/recursor-generated-schema.yaml: .venv generate-jsonschema.py http-api/authoritative-api-openapi.yaml
+       .venv/bin/python ./generate-jsonschema.py http-api/authoritative-api-openapi.yaml $@ 
 
 # Catch-all target: route all unknown targets to Sphinx using the new
 # "make mode" option.  $(O) is meant as a shortcut for $(SPHINXOPTS).
diff --git a/pdns/recursordist/docs/http-api/authoritative-api-openapi.yaml b/pdns/recursordist/docs/http-api/authoritative-api-openapi.yaml
new file mode 120000 (symlink)
index 0000000..c84f149
--- /dev/null
@@ -0,0 +1 @@
+../../../../docs/http-api/openapi/authoritative-api-openapi.yaml
\ No newline at end of file
diff --git a/pdns/recursordist/docs/http-api/authoritative-api-swagger.yaml b/pdns/recursordist/docs/http-api/authoritative-api-swagger.yaml
deleted file mode 120000 (symlink)
index b904e06..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../../../../docs/http-api/swagger/authoritative-api-swagger.yaml
\ No newline at end of file
index 897a78870b92aa0a90ce437bc5331854c93d4c9a..e8c15027af75a5d85ffe433fbdcef50b54fb3457 100644 (file)
@@ -787,7 +787,7 @@ if python.found()
     command: [
       python,
       product_source_dir / docs_dir / 'generate-jsonschema.py',
-      product_source_dir / docs_dir / 'http-api' / 'authoritative-api-swagger.yaml',
+      product_source_dir / docs_dir / 'http-api' / 'authoritative-api-openapi.yaml',
       product_source_dir / docs_dir / 'http-api' / 'recursor-generated-schema.yaml',
       '--stampfile',
       '@OUTPUT@'
index dd35a996f0b9ed9669208deda6ef46784c62a8c7..f7002ba9f9d5f5eb113aed98885e4ba6c5d5f9e8 100644 (file)
@@ -1126,13 +1126,13 @@ static bool isValidMetadataKind(const string& kind, bool readonly)
 void apiDocs(HttpRequest* req, HttpResponse* resp)
 {
   if (req->accept_yaml) {
-    resp->setYamlBody(g_api_swagger_yaml);
+    resp->setYamlBody(g_api_openapi_yaml);
   }
   else if (req->accept_json) {
-    resp->setJsonBody(g_api_swagger_json);
+    resp->setJsonBody(g_api_openapi_json);
   }
   else {
-    resp->setPlainBody(g_api_swagger_yaml);
+    resp->setPlainBody(g_api_openapi_yaml);
   }
 }
 
index d438d7669ddfd728eb97cc9d09865290f3b9c9d0..a94ce06dde689b773f9910ae9697642e80f20e42 100644 (file)
--- a/tasks.py
+++ b/tasks.py
@@ -1666,16 +1666,16 @@ def test_bulk_recursor(c, size, threads, mthreads, shards, ipv6):
 
 
 @task
-def install_swagger_tools(c):
+def install_openapi_tools(c):
     c.run("sudo apt-get update && sudo apt-get install -y npm")
     c.run("sudo mkdir -p /usr/local/lib/node_modules && sudo chmod 777 /usr/local/lib/node_modules")
     c.run("npm install -g @stoplight/spectral-cli")
 
 
 @task
-def swagger_syntax_check(c):
+def openapi_syntax_check(c):
     c.run(
-        "spectral lint --ruleset docs/http-api/swagger/spectral-ruleset.yaml --fail-severity error --display-only-failures docs/http-api/swagger/authoritative-api-swagger.yaml"
+        "spectral lint --ruleset docs/http-api/openapi/spectral-ruleset.yaml --fail-severity error --display-only-failures docs/http-api/openapi/authoritative-api-openapi.yaml"
     )