Skip to content

auth: http api fixes - #17870

Open
miodvallat wants to merge 4 commits into
PowerDNS:masterfrom
miodvallat:rtfm
Open

auth: http api fixes#17870
miodvallat wants to merge 4 commits into
PowerDNS:masterfrom
miodvallat:rtfm

Conversation

@miodvallat

Copy link
Copy Markdown
Contributor

Short description

This PR addresses recent reports of documentation inaccuracies.

  • it fixes the documentation to not show zone contents reported in the "list all zones" operation.
  • it removes a non-working, undocumented endpoint from the code
  • it removes a documented, never implemented endpoint from the documentation

Checklist

I have:

  • read the CONTRIBUTING.md document
  • read and accepted the Developer Certificate of Origin document, including the AI Policy, and added a "Signed-off-by" to my commits
  • compiled this code
  • tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
…Sets.

This makes the generated example for the GET .../zones endpoint closer
to reality.

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
As far as I can tell, it has never been implemented.

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
It would behave as POST on .../cryptokeys and wasn't documented anyway.

Fixes: PowerDNS#17807

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
@miodvallat

Copy link
Copy Markdown
Contributor Author

Fixes: #17834

@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 31075284551

Coverage increased (+5.2%) to 71.199%

Details

  • Coverage increased (+5.2%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 47 coverage regressions across 12 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

47 previously-covered lines in 12 files lost coverage.

Top 10 Files by Coverage Loss Lines Losing Coverage Coverage
pdns/recursordist/test-syncres_cc1.cc 11 80.01%
pdns/signingpipe.cc 6 83.68%
pdns/misc.cc 5 61.99%
pdns/recursordist/syncres.cc 5 81.81%
pdns/iputils.hh 3 74.63%
pdns/misc.hh 3 85.89%
pdns/recursordist/pdns_recursor.cc 3 75.66%
pdns/recursordist/test-syncres_cc2.cc 3 79.39%
pdns/remote_logger.cc 3 55.44%
pdns/backends/gsql/gsqlbackend.hh 2 88.57%

Coverage Stats

Coverage Status
Relevant Lines: 173007
Covered Lines: 135067
Line Coverage: 78.07%
Relevant Branches: 82766
Covered Branches: 47040
Branch Coverage: 56.83%
Branches in Coverage %: Yes
Coverage Strength: 6961487.39 hits per line

💛 - Coveralls

last_check:
type: integer

ZoneWithoutRRSets:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this feels like terrible duplication, and the "/servers/{server_id}/zones/{zone_id}" endpoint supports rrsets=false - for which I have no idea if a strict openapi client accepts that (we should find out)

I also notice that in the Zone schema, we already clarify description: "RRSets in this zone (for zones/{zone_id} endpoint only; omitted during GET on the .../zones list endpoint)"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if it is possible to declare Zone as being ZoneWithoutRRSets plus the count and rrset fields. This sure would help.

I also notice that in the Zone schema, we already clarify description: "RRSets in this zone (for zones/{zone_id} endpoint only; omitted during GET on the .../zones list endpoint)"

Unfortunately, the generated example in the documentation do not copy anything from the description. Which is why the ..../zones example had rrsets in the sample output in the first place.

default:
$ref: "#/components/responses/Error"

"/servers/{server_id}/config/{config_setting_name}":

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

responding to "As far as I can tell, it has never been implemented." in the commit message: any and all evidence I can find in git history is that besides this openapi doc, the /servers/{server_id} endpoint has also claimed its existence. I agree with removing it from this spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants