Giter Site home page Giter Site logo

apitest-jsonpath's Issues

Please add a LICENSE

Hi, I was trying to read the documentation for this code today, and it will not display on https://pkg.go.dev/github.com/steinfletcher/apitest-jsonpath, and the reason given is "Documentation not displayed due to license restrictions."

I think the issue might be that there is no LICENSE file at all for this code; this may also make developers hesitant to use it. Thanks! I have been enjoying learning about and using apitest.

Missing bracket in examples

apitest.New().
	Handler(handler).
	Get("/articles?category=golang").
	Expect(t).
	Assert(jsonpath.Len(`$.items`, 3).
	End()

Misses closing parentheses in assert.

Array equality question

Probably more of a question than an issue, but possibly the documentation could reflect this.

Given JSON like

[
  {
    "id": 1,
    "created_at": "2023-04-21"
  },
  {
    "id": 2,
    "created_at": "2023-04-22"
  },
  {
    "id": 3,
    "created_at": "2023-04-23"
  },
  {
    "id": 4,
    "created_at": "2023-04-24"
  }
]

Then asserting

Assert(jsonpath.Equal(`$[*].id`, [4]float64{1, 2, 3, 4}))

Results in

"[%!s(float64=1) %!s(float64=2) %!s(float64=3) %!s(float64=4)]" not equal to "[%!s(float64=1) %!s(float64=2) %!s(float64=3) %!s(float64=4)]"

Those look identical.

What's the correct way to assert on all of the IDs at once?

Unexpected error - strings not equal

Here is my assertion:

jsonpath.Equal(`$.items[?(@._links.parent.href == "PATH")].name`), "active"),

And the error I'm getting

Received unexpected error:
"[active]" not equal to "active"

So i changed to This

jsonpath.Equal(`$.items[?(@._links.parent.href == "PATH")].name`), "[active]"),

and now the error is...

Received unexpected error:
"[active]" not equal to "[active]"

Dependabot can't resolve your Go dependency files

Dependabot can't resolve your Go dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:


If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.