Skip to content

API Docs returns types not entirely correct #1499

@chesseed

Description

@chesseed

I've been writing an API client and I've been biten multiple times by the docs of the return types. So I'd like to improve the documentation. But beforehand I want to know how handle things.

There are two types of differences between the docs and the implementation:

  1. The names in the docs are lowercase, in the implementation uppercase
  2. The docs specify members, that are internal and should not be exposed

In many cases it should be enough to add the missing json struct tags e.g deb.Snapshot or deb.LocalRepo

But deb.PublishedRepo is different. The MarshalJSON creates an anonymous intermediate struct with a different Sources type. So to properly document it the anonymous struct should be made in a concrete type, right?

Is there anything I'm missing or some reason against improving the docs this way?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions