Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    api-tester_1  | actual: 
    api-tester_1  | statusCode: 404
    api-tester_1  | headers: 
    api-tester_1  |     connection: close
    api-tester_1  |     server: Cowboy
    api-tester_1  |     date: Mon, 18 Sep 2017 10:50:15 GMT
    api-tester_1  |     content-length: 4
    api-tester_1  |     cache-control: max-age=0, private, must-revalidate
    api-tester_1  | 
    api-tester_1  | body: 
    api-tester_1  | oops
    however the analogous curl works:
    # curl -H "Content-Type: application/json" -X POST -d '{"UserId": "1", "Goal":"25","MaxReps": "1"}' | jq
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100   382  100   339  100    43   239k  31136 --:--:-- --:--:-- --:--:--  331k
      "Workout": [
          "Units": "3",
          "SequenceNo": "1",
          "Action": "Pullups"
    any idea what's wrong with the request in my apib file?
    Michal Samek
    Hi, I possibly opened an unnecessary GitHub ticket apiaryio/dredd#910 for something that can be discussed here. As mentioned in the issue, I am having troubles finding a bug in my hooks python implementation. As stated, no errors are logged, only the hook handler times out all the time. Is there a way how to get a deeper information on what is going wrong in my hook files?
    BERTHELOT Aymeric

    Hello everybody,
    Small question, is it possible to use $ref for the Swagger specification with dreed?

    '/ V1 / maintenance / transaction / transaction_reference {}':
    $ ref: 'maintenance / transaction / post-transaction_reference.yml'

    I do not think but would like to be sure ... Thanks
    Honza Javorek
    @category how does your API description document look like?
    Honza Javorek
    @legithubdeaymeric it is not able to ref external files, for security reasons - see relevant discussion here: apiaryio/dredd#676
    Joshua Barnett
    Parser warning in file './specs/v1.0/2.0.0/swagger.yaml': Unable to generate multipart/form-data; boundary=BOUNDARY example message body out of JSON Schemaon line 130
    Does anyone have examples of testing POST endpoints that consumer multipart/form-data containing parameters of type file?
    Honza Javorek

    @synthecypher hi, does this example work for you? http://dredd.org/en/latest/how-to-guides.html#sending-multipart-requests

    also, there is a test for multipart requests and it uses following fixture: https://github.com/apiaryio/dredd/blob/master/test/fixtures/request/multipart-form-data.yaml

    Joshua Barnett
    @honzajavorek I've seen those examples but there's nothing in those about testing file uploads through POST endpoints that consumer multipart/form-data containing parameters of type: file.
    @honzajavorek it also appears that I cannot modify the request body of multipart/form-data POST requests. The body is just empty.
    Even though when the request is sent from Dredd it has a body.
    Is there a way to modify the FormData sent in these requests via hooks?
    Honza Javorek

    @synthecypher hmmm... I think "file" is still to be correctly supported in the Swagger adapter - apiaryio/fury-adapter-swagger#146

    Regarding the example value used by Dredd, you should be able to specify it by the schema.example property: parameters / in: "body" / schema / example

    hello guys, I am trying to do a npm install -g dredd but I am getting this error
    I have no problems installing anything else with npm
    only dredd
    does anyone have any suggestions how to resolve this?
    Honza Javorek
    @sarahasg hi, are you behind a corporate proxy or something like that?
    I'm sorry for not replying earlier, I had rather long vacation.
    Andrew Zakordonets
    Hello everyone. Did anyone manage to make Dredd use values specified in swagger deginition object example field ? I described definition object - for each field i have specified example value, and in Swagger UI i can actually see my example, but when i run dredd test - it generates it's own values and doesn't take values from example
    Andrew Zakordonets
    Another problem i'm facing is that transaction object for me is always empty..
    hooks.before('/dev/lead > Creates a new Bla > 200 > application/json', transaction => {
        var requestBody = JSON.parse(transaction.request.body)
        hooks.log('Before lead Transaction request is ', JSON.stringify(requestBody, null, 2))
        hooks.log('Before lead Transaction request is ', transaction)
        hooks.log('Before lead Transaction request is ', transaction.fullPath)
    Gives this
    hook: ------------------------YAY------------------------
    hook: Before lead Transaction request is
    hook: Before lead Transaction request is
    hook: Before lead Transaction request is
    Andrew Zakordonets
    if i use console.log(transaction) then i can see details
    really confusing
    Chilaka Ramakrishna
    is this chat active?
    Andrew Zakordonets
    doesn't look like..
    Chilaka Ramakrishna
    ha ha
    hi andrew
    i have a small doubts
    please try to answer
    i have a base object and it has some required properties
    i want to use the same object with some additional properties but in the new object, there shouldn't be any required attributes
    Andrew Zakordonets
    For me it looks like it should not be possible, but i'm not an expert in this matter :)
    Nikita Kunets
    Hi everyone)
    @thesageinpilani as I understand as far as it is just yaml and dredd is just a thing that parse this yaml there is no any inheritance
    Chilaka Ramakrishna
    thanks @azakordonets @dkder3k
    i have another doubt, i am new to dredd contract testing
    do i have to write functions for every possible response status code?