Giter VIP home page Giter VIP logo

api-diff's Issues

query param modification

My application supports requests with bulk parameter support, so for ex, URL is like /foo?id=1&id=3&id=5, its converting the same to /foo?id[]=1&id[]=3&id[]=5

how to handle this to avoid brackets getting added

Support pathname in host when http(s) is specified

If I do this currently:

api-diff \
--old.host https://api.mywebsite.com/api/v1/ \
--new.host https://api.mywebsite.com/api/v2/ \
--endpoint /myendpoint \
--method POST \
--input_params input_params.txt \
--output_mode html > output.html

Everything after .com gets stripped, which means it's not possible to test different versions of API on the same host.

This seems to only happen when I put "http" or "https" in the host urls.

How to handle response with absolute URLs

In my API the response contains an absolute URL. For example:

{
  "url": "https://staging.example.com/api/node/1"
}

and

{
  "url": "https://example.com/api/node/1"
}

Running the following command

api-diff \
 --new.host staging.example.com \
 --old.host example.com \
 --input_queries queries.txt \
 --output_mode html \
 -o report.html

Will tell me that there is a difference in API response. But as you can see the difference only occurs in the hostname. The reset /api/node/1 is the same.

Is there any flag to ignore host and ignore the occurrence of hostname in API response?

Compare against basline not working

HI

Thanks for this tool . I almost got it to work but the compare with baseline won't do it.

These 2 Commands ARE working, so I'm pretty sure the config.hjson is correct ..

API_DIFF_CONFIG=config.hjson api-diff \
  --old.dev \
  --old.key NOOONNNNNNNNOOO=\
  --new.dev \
  --new.key NOOONNNNNNNNOOO=\
  --input_queries sqmsII.txt
  API_DIFF_CONFIG=config.hjson api-diff generate-baseline \
  --old.dev \
  --old.key NOOONNNNNNNNOOO=\
  --input_queries sqmsII.txt \
   > addresses-baseline.json 

But both of these commands give me an error

API_DIFF_CONFIG=config.hjson api-diff \
  --new.dev \
  --new.key NOOONNNNNNNNOOO=\
  --input_json_baseline addresses-baseline.json

PROCESS FAILED
Could not find host via arguments specified {
"extra_params": [],
"key_type": "test"
}

API_DIFF_CONFIG=config.hjson api-diff \
  --new.host https://XXX.bpmspace.net \
  --new.key NOOONNNNNNNNOOO=\
  --input_json_baseline addresses-baseline.json

PROCESS FAILED
Could not find host via arguments specified {
"extra_params": [],
"key_type": "test"
}

Also Without Config file I get an error (sliltly different)

api-diff \
  --new.host https://XXX.bpmspace.net \
  --new.key NOOONNNNNNNNOOO=\
  --input_json_baseline addresses-baseline.json

PROCESS FAILED
Could not find host via arguments specified {
"extra_params": []
}

Can you please help me?
thanks rob

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.