]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
doc(rec): Fix meson dist and the Zone object
authorPieter Lexis <pieter.lexis@powerdns.com>
Tue, 10 Feb 2026 14:11:00 +0000 (15:11 +0100)
committerPieter Lexis <pieter.lexis@powerdns.com>
Mon, 23 Mar 2026 09:34:54 +0000 (10:34 +0100)
pdns/recursordist/docs/http-api/endpoint-zones.rst
pdns/recursordist/docs/http-api/recursor-schema.yaml
pdns/recursordist/docs/http-api/zone.rst
pdns/recursordist/meson.build

index e6b86221afa82bd4151755d0b0228c3d215bc006..abc016e298fdf3b21e5d57c9fec7a6025605ff85 100644 (file)
@@ -9,7 +9,7 @@ Zones endpoint
 
 .. http:post:: /api/v1/servers/:server_id/zones
 
-  Creates a new domain. The client body must contain a :json:schema:`Zone`.
+  Creates a new domain. The client body must contain a :json:schema:`RecursorZone`.
 
   :query server_id: The name of the server
 
@@ -18,11 +18,11 @@ Zones endpoint
   Returns zone information.
 
   :query server_id: The name of the server
-  :query zone_id: The id number of the :json:schema:`Zone`
+  :query zone_id: The id number of the :json:schema:`RecursorZone`
 
 .. http:delete:: /api/v1/servers/:server_id/zones/:zone_id
 
   Deletes this zone, all attached metadata and rrsets.
 
   :query server_id: The name of the server
-  :query zone_id: The id number of the :json:schema:`Zone`
+  :query zone_id: The id number of the :json:schema:`RecursorZone`
index e21893c0b07cde03e26fa3e4f8dd1a5ed21a7821..deefa88cfadf6b9ce0c3c6cf087c9d2190cff4ce 100644 (file)
@@ -1,6 +1,64 @@
 $id: "PDNS Recursor webserver"
 
 definitions:
+  Record:
+    $id: RecursorRecord
+    title: Record
+    type: object
+    description: This represents a DNS Record in a zone
+    properties:
+      name:
+        type: string
+        description: "The owner name of the record"
+      type:
+        type: string
+        description: "Type of this record (e.g. “A”, “PTR”, “MX”)"
+      ttl:
+        type: integer
+        description: "DNS TTL of the record, in seconds"
+      content:
+        type: string
+        description: "The content of this record"
+
+  Zone:
+    $id: RecursorZone
+    title: Zone
+    type: object
+    properties:
+      id:
+        type: string
+        description: Opaque zone id (string), assigned by the server, should not be interpreted by the application. Guaranteed to be safe for embedding in URLs.
+      name:
+        type: string
+        description: Name of the zone (e.g. "example.com.") MUST have a trailing dot
+      type:
+        type: string
+        description: Set to "Zone"
+      url:
+        type: string
+        description: API endpoint for this zone
+      kind:
+        enum:
+          - Native
+          - Forwarded
+        description: Zone kind, one of "Native", "Forwarded".
+      records:
+        type: array
+        items:
+          $ref: "RecursorRecord"
+        description: Records in this zone
+      servers:
+        type: array
+        items:
+          type: string
+        description: For zones of type "Forwarded", addresses to send the queries to
+      recursion_desired:
+        type: bool
+        description: For zones of type "Forwarded", Whether or not the RD bit should be set in the query
+      notify_allowed:
+        type: bool
+        description: For zones of type "Forwarded", Whether or not to permit incoming NOTIFY to wipe cache for the domain
+
   OpenTelemetryTraceCondition:
     $id: OpenTelemetryTraceCondition
     title: OpenTelemetryTraceCondition
index 85b4e3435601c8fb0bf269a0926dec0302b31897..f4f7177db3b35408d8af62e93050459588d20129 100644 (file)
@@ -10,7 +10,8 @@ A Resource Record Set (below as "RRset") are all records for a given name and ty
 
 Comments are per-RRset.
 
-.. json:schema:: Zone
+.. json:schema:: RecursorZone
+   :title: Zone
 
 To properly process new zones, the following conditions must
 be true:
@@ -25,4 +26,5 @@ be true:
 * For configuration changes to work :ref:`setting-include-dir` and :ref:`setting-api-config-dir` should have the same value for old-style settings.
   When using YAML settings :ref:`setting-yaml-recursor.include_dir` and :ref:`setting-yaml-webservice.api_dir` must have a different value.
 
-.. include:: ../common/api/zone.rst
+.. json:schema:: RecursorRecord
+   :title: Record
index 14906e5ec80da5283b1ea6f3851aa84484cc0b32..b8de5538578b33f94af80b510852bdbccd46f774 100644 (file)
@@ -781,12 +781,11 @@ dep_conf_distfile = custom_target(
 if python.found()
   json_schema = custom_target(
     'recursor-json-schema',
-    input: product_source_dir / docs_dir / 'http-api' / 'authoritative-api-swagger.yaml',
     output: 'rec-schema-generated.stamp',
     command: [
       python,
       product_source_dir / docs_dir / 'generate-jsonschema.py',
-      '@INPUT@',
+      product_source_dir / docs_dir / 'http-api' / 'authoritative-api-swagger.yaml',
       product_source_dir / docs_dir / 'http-api' / 'recursor-generated-schema.yaml',
       '--stampfile',
       '@OUTPUT@'