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

Ranges for JSON paths with escaped slashes are incorrect #457

Closed
P0lip opened this issue Aug 18, 2019 · 0 comments · Fixed by #458
Closed

Ranges for JSON paths with escaped slashes are incorrect #457

P0lip opened this issue Aug 18, 2019 · 0 comments · Fixed by #458
Assignees
Labels
t/bug Something isn't working

Comments

@P0lip
Copy link
Contributor

P0lip commented Aug 18, 2019

Describe the bug
A clear and concise description of what the bug is.

To Reproduce

  1. Given this OpenAPI document
{
  "openapi": "3.0.0",
  "info": {
    "title": "Foo",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "http://localhost:3000"
    }
  ],
  "paths": {
    "/users": {
      "get": {
        "summary": "Your GET endpoint",
        "tags": [],
        "responses": {}
      }
    }
  },
  "components": {
    "schemas": {}
  }
}
  1. The following range is produced for oas3-schema error
{
  "end": {
    "character": 23,
    "line": 16
  },
  "start": {
    "character": 10,
    "line": 11
  }
}

Expected behavior
The following range is generated:

{
  "end": {
    "character": 23,
    "line": 16
  },
  "start": {
    "character": 20,
    "line": 16
  }
}
@P0lip P0lip added the t/bug Something isn't working label Aug 18, 2019
@P0lip P0lip self-assigned this Aug 18, 2019
@P0lip P0lip added this to the Aug '19 Hardening milestone Aug 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant