Giter VIP home page Giter VIP logo

Comments (3)

yogeshnikam671 avatar yogeshnikam671 commented on June 3, 2024 1

Hey @noelmccrory, thanks for reporting this. Really appreciate the detailed logs that you have shared!
We will try to reproduce the issue and share the root cause with you in a while.
We will then plan to fix it as per the root cause analysis.

from specmatic.

noelmccrory avatar noelmccrory commented on June 3, 2024

I was able to workaround this by using a stub expectation file, rather than an example in the API Spec.

{
  "http-request": {
    "path": "/document/(docid:uuid)/document-status",
    "method": "GET"
  },
  "http-response": {
    "status": 200,
    "body": "COMPLETE",
    "headers": {
      "Content-Type": "application/json"
    }
  }
}

from specmatic.

noelmccrory avatar noelmccrory commented on June 3, 2024

It looks like there are similar issues for Contract Tests. I get the following error:

  Request to http://localhost:60199 at 2024-5-2 3:13:13.389
    GET /document/e49c9039-5c89-4396-9dff-f3b9a32cacc9/document-status
    Authorization: Bearer abcdef
    Accept-Charset: UTF-8
    Accept: */*
    Content-Type: NOT SENT
    
    

  Response at 2024-5-2 3:13:13.389
    200 OK
    Content-Type: application/json
    
    "COMPLETE"

 Scenario: GET /document/(id:uuid)/document-status -> 200 | EX:GET_DOCUMENT_STATUS has FAILED
Reason: Testing scenario "GET /document/(id:uuid)/document-status. Response: OK"
	API: GET /document/(id:uuid)/document-status -> 200
	
	  >> RESPONSE.BODY
	  
	     Contract expected ("IN_PROGRESS" or "COMPLETE" or "FAILED") but response contained "\"COMPLETE\""

Interestingly, this is returning an application/json response, but seems like another part of Specmatic is expecting it to be just plaintext.

from specmatic.

Related Issues (20)

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.