Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    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 axios.post('http://new-mock-server.provider-configurations.dcos.dev-fra-apps.zooz.co/expectation', data);
    switch (transaction.name) {
    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
    how to mark a hook as passed . "transaction['pass'] = True " isn't working.