Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    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?
    is there any way where i would write only one function for testing one API
    Chilaka Ramakrishna
    i cannot show you guys code that is written by some other guys
    but this guy is calling a single function and building json object which has expected key, like it does show during dredd
    and hitting a mock server
    and writing promise on that
    any idea
    Nikita Kunets
    Hmm, at the moment I have no any idea, sry. But some time later I will investigate this question
    Chilaka Ramakrishna
    can i show you the code?
    may be you will understand ?
    const pcsNotFoundExpectation = (xZoozRequestId, fundTargetId) => {
    return {
    method: 'GET',
    statusCode: 404,
    statusMessage: 'Not found',
    'x-zooz-request-id': xZoozRequestId,
    requestBody: {},
    path: /v1/configurations/${fundTargetId},
    expectedBody: {
    code: 40000,
    message: 'Error',
    description: 'fund_target_id does not exist'
    unlimited: true
    const createExpectationForPCS = async (xZoozRequestId, fundTargetId, statusCode, merchantCode) => {
    let data;
    switch (statusCode) {
    case 404:
    data = pcsNotFoundExpectation(xZoozRequestId, fundTargetId);
    case 500:
    data = pcsInternalServerErrorExpectation(xZoozRequestId, fundTargetId);
    data = pcsOptimisticExpectation(xZoozRequestId, fundTargetId, merchantCode);
    await'', data);
    switch ( {
    case 'authorization > /v3/payments/{payment_id}/authorizations > authorize request > 201 > application/json; charset=utf-8': {
    transaction.skip = false;
    const request = requestBuilder.buildAuthorization(JSON.parse(transaction.request.body), transaction.request.headers);
    return expectationBuilder.createExpectationForPCS(request.headers['X-Zooz-Request-Id'], request.body.fund_target_id, 200)
    .then(() => {
    transaction.request.body = JSON.stringify(request.body);
    transaction.request.headers['X-Zooz-Request-Id'] = request.headers['X-Zooz-Request-Id'];
    transaction.request.headers['Zooz-Mock-PaymentsStorage'] = 'state-payment_initial';
    Chilaka Ramakrishna
    Chilaka Ramakrishna
    how do i debug dredd
    how do i use inspect-brk with dredd
    Joan Ortega

    Hello everybody. I'm using dredd and we're making a migration from swagger 2 to openApi 3. I've a problem with the new openapi file. Dredd says me "Compilation error in file './swagger.yaml': Required URI parameter 'repository' has no example or default value."

    But it is already defined on the openapi file

            - skills
          summary: Get some skills
          description: Get some skills
          operationId: skillsGET
            - token: []
          x-exegesis-controller: skills
            - name: repository
              in: path
              description: Ref of the repository
              required: true
                type: string
              example: content@cockpitRecette-demo
    any idea? thanks
    Honza Javorek
    @jomaora use "x-example" instead of "example", OAS2 doesn't support "example"
    Joan Ortega
    @honzajavorek i'm using OpenApi 3
    @jomaora example: "content@cockpitRecette-demo". Try this if this solves your issue