Comments (3)
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.
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.
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)
- Regex in router specmatic considering multiple endpoints which are not actual endpoints present in service. HOT 2
- API response not being validated with OpenAPI Response's example HOT 1
- Timeout cannot be set to more than 10s using --timeout. HOT 2
- The named examples are not being picked up correctly when there is no response example for 204 responses.
- Specmatic should throw error instead of did not run when schema is invalid. HOT 4
- BearerAuth token not getting generated (1.3.11) HOT 4
- Use SpecmaticJUnitSupport as a JUnit Extension HOT 9
- Specmatic unable to parse valid DateTime HOT 2
- Transient expectation not match if the request path contains query parameters HOT 1
- Specmatic Docker image for backward compatibility checks in CI example HOT 5
- Docker image latest tag is missing HOT 2
- When trying to use exclude endpoint without successCriteria it throws error. HOT 2
- test issue - to be deleted
- Support for OpenAPI Specification - 'format' property for 'password' and 'email' HOT 2
- Stubbing Apache Pulsar HOT 2
- Getting Error -> Error: Java heap space\n' HOT 4
- Specmatic Stubs picks up 400 Examples and fails due to it. HOT 3
- How to Mock when running specmatic for Python.
- Support for File Path Resolution in $ref Property in Specmatic HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from specmatic.