@@ -251,6 +251,13 @@ def autoprimary_list(ctx):
251251 raise SystemExit (1 )
252252
253253
254+ @autoprimary .command ("spec" )
255+ def autoprimary_spec ():
256+ """Open the autoprimary specification on https://redocly.github.io"""
257+
258+ utils .open_spec ("autoprimary" )
259+
260+
254261@cli .group ()
255262def config ():
256263 """Overall server configuration"""
@@ -295,6 +302,13 @@ def config_stats(ctx):
295302 raise SystemExit (1 )
296303
297304
305+ @config .command ("spec" )
306+ def config_spec ():
307+ """Open the config specification on https://redocly.github.io"""
308+
309+ utils .open_spec ("config" )
310+
311+
298312@cli .group ()
299313def cryptokey ():
300314 """Configure cryptokeys"""
@@ -541,6 +555,13 @@ def cryptokey_publish(ctx, dns_zone, cryptokey_id):
541555 raise SystemExit (1 )
542556
543557
558+ @cryptokey .command ("spec" )
559+ def cryptokey_spec ():
560+ """Open the cryptokey specification on https://redocly.github.io"""
561+
562+ utils .open_spec ("cryptokey" )
563+
564+
544565@cryptokey .command ("unpublish" )
545566@click .pass_context
546567@click .argument ("dns_zone" , type = PowerDNSZone , metavar = "zone" )
@@ -663,6 +684,13 @@ def network_delete(ctx, cidr):
663684 raise SystemExit (1 )
664685
665686
687+ @network .command ("spec" )
688+ def network_spec ():
689+ """Open the network specification on https://redocly.github.io"""
690+
691+ utils .open_spec ("network" )
692+
693+
666694@cli .group ()
667695def record ():
668696 """Resource records of a zone"""
@@ -1020,6 +1048,12 @@ def record_export(
10201048 raise SystemExit (1 )
10211049
10221050
1051+ @record .command ("spec" )
1052+ def record_spec ():
1053+ """Open the record specification on https://redocly.github.io"""
1054+ utils .open_spec ("record" )
1055+
1056+
10231057@cli .group ()
10241058def tsigkey ():
10251059 """Set up tsigkeys"""
@@ -1118,6 +1152,13 @@ def tsigkey_list(ctx):
11181152 raise SystemExit (1 )
11191153
11201154
1155+ @tsigkey .command ("spec" )
1156+ def tsigkey_spec ():
1157+ """Open the tsigkey specification on https://redocly.github.io"""
1158+
1159+ utils .open_spec ("tsigkey" )
1160+
1161+
11211162@tsigkey .command ("update" )
11221163@click .argument ("name" , type = click .STRING )
11231164@click .option (
@@ -1306,6 +1347,13 @@ def zone_rectify(ctx, dns_zone):
13061347 raise SystemExit (1 )
13071348
13081349
1350+ @zone .command ("spec" )
1351+ def zone_spec ():
1352+ """Open the zone specification on https://redocly.github.io"""
1353+
1354+ utils .open_spec ("zone" )
1355+
1356+
13091357@zone .command ("search" )
13101358@click .argument ("search-string" , metavar = "STRING" )
13111359@click .option ("--max" , "max_output" , help = "Number of items to output" , default = 5 , type = click .INT )
@@ -1430,6 +1478,12 @@ def metadata_list(ctx, dns_zone, limit):
14301478 raise SystemExit (1 )
14311479
14321480
1481+ @metadata .command ("spec" )
1482+ def metadata_spec ():
1483+ """Open the metadata specification on https://redocly.github.io"""
1484+ utils .open_spec ("metadata" )
1485+
1486+
14331487@metadata .command ("update" )
14341488@click .argument ("dns_zone" , type = PowerDNSZone , metavar = "zone" )
14351489@click .argument ("metadata-key" , type = click .STRING )
@@ -1542,6 +1596,13 @@ def view_list(ctx):
15421596 raise SystemExit (1 )
15431597
15441598
1599+ @view .command ("spec" )
1600+ def view_spec ():
1601+ """Open the view specification on https://redocly.github.io"""
1602+
1603+ utils .open_spec ("view" )
1604+
1605+
15451606# pylint: disable=unused-argument
15461607@view .command ("update" )
15471608@click .argument ("view_id" , type = click .STRING , metavar = "view" )
0 commit comments