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

Error in response definition for Trace by Trace ID #9

Closed
devinsba opened this issue Apr 15, 2016 · 0 comments
Closed

Error in response definition for Trace by Trace ID #9

devinsba opened this issue Apr 15, 2016 · 0 comments

Comments

@devinsba
Copy link
Member

I'm trying to use a code generator around this swagger definition, unfortunately the definition for the Trace by Trace ID endpoint is defined incorrectly, its subtle though.

    get:
      responses:
        200:
          description: OK
          schema:
            description: An array of spans that share the same trace id
            type: array
            items:
              $ref: "#/definitions/Trace"

A Trace is defined as an array of Spans already. I believe the type on this should be "#/definitions/Trace" instead of array. At least that would match what I am getting back from zipkin-query api.

[
    {
        "traceId": "fc12844aa4e770a8",
        "name": "http://example.com",
        "id": "fc12844aa4e770a8",
        "timestamp": 1460731584302000,
        "duration": 23000,
        "annotations": [
            {
                "timestamp": 1460731584302000,
                "value": "cs",
                "endpoint": {
                    "serviceName": "some-service",
                    "ipv4": "10.14.8.219",
                    "port": 7070
                }
            },
            {
                "timestamp": 1460731584325000,
                "value": "cr",
                "endpoint": {
                    "serviceName": "some-service",
                    "ipv4": "10.14.8.219",
                    "port": 7070
                }
            }
        ],
        "binaryAnnotations": [
            {
                "key": "http.uri",
                "value": "http://example.vom",
                "endpoint": {
                }
            }
        ]
    }
]

I'm in a bunch of meetings today but I will submit a PR if I get a few minutes to apply my change and test it.

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

No branches or pull requests

1 participant