Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API doc improvements #51

Merged
merged 3 commits into from
Apr 30, 2019
Merged

Conversation

cshoe
Copy link
Contributor

@cshoe cshoe commented May 2, 2018

  • changed version to 2
  • Added example values for span. This makes the example JSON in the
    spans POST valid. (Fixes Fix example json #46).

The spans POST documentation is still a bit misleading. With the parameter named "spans", it seems to imply that it's expecting

{
    "spans": [{<...span...>}, {<....span...>}]
}

but it actually wants:

[{<...span...>}, {<...span...>}]

I couldn't figure out a way to acurately represent this in Swagger 2. It might be possible using Swagger 3 request body descriptions.

* changed version to 2
* Added example values for span. This makes the example JSON in the
spans POST valid. (Fixes openzipkin#46).

The spans POST documentation is still a bit misleading. With the
parameter named "spans", it seems to imply that it's expecting

```json
{
    "spans": [{<...span...>}, {<....span...>}]
}
```

but it actually just wants:

```json
[{<...span...>}, {<...span...>}]
```

I couldn't figure out a way to acurately represent this in Swagger 2. It
might be possible using [Swagger
3 request body descriptions.](https://swagger.io/docs/specification/describing-request-body/)
@codefromthecrypt codefromthecrypt merged commit 6a76bc0 into openzipkin:master Apr 30, 2019
@codefromthecrypt
Copy link
Member

thanks for the help. follow-ups can be a separate PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix example json
3 participants