Comments (5)
I work a lot writing servers using Rest API and servers for communicating with IOT devices.
I consider that .hurl files would be perfect for defining an API specification.
But without semantic validation the work becomes much more difficult, and the idea of freezing a specification and building servers is a little weakened if I constantly have to change the .hurl files due to a change in order in the properties or if the files are unreadable by human beings.
from hurl.
This one is clearly not semantic
```
{
"bar": true
}
```
but I'm not sure when the string type json
is specified.
```json
{
"bar": true
}
```
Setting such a request body adds automatically the `Content-Type: application/json' header.
So maybe this one should also be semantic.
from hurl.
I would like to thank you very much for your feedback.
I wasn't trying to argue about whether ```json should be semantic or not.
Actually, to be honest, I had forgotten that sending a direct json without a backtick works.
What I really miss is JSON semantic validation, which will allow me to migrate tests and documentation to the .hurl file.
I don't work much with XML in rust, but JSON seems like a not very difficult problem, but I don't really understand anything about the internal workings of hurl.
Semantic validation, for example, allows you to define the specification of an API in a .hurl file and at the same time serve as tests.
That in itself is beautiful, in the file format you define.
from hurl.
Hi @marcodpt
We're currently preparing the work for better error reporting and this work is the route to semantic difference.
A first batch of refacto is to be able to able to show better diff with multiline ```
The multiline check will not be semantic, whereas the JSON (and XML) body will be semantic. This way, user could choose to have semantic or "raw" diff.
To be clear (unless I'm mistaken of what we want @fabricereix )
Not semantic, raw diff, whitespaces sensitive:
GET https://foo.com/json
HTTP 200
```json
{
"bar": true
}
```
GET https://foo.com/csv
HTTP 200
```
aaa,bbb,ccc
aaa,bbb,ccc
```
=> current work is to improve the error diag
Semantic, whitespaces unsensitive:
GET https://foo.com/json
HTTP 200
{
"bar": true
}
from hurl.
Yes it makes sens
from hurl.
Related Issues (20)
- Generate junit report directory structure too (mkdir -p) HOT 4
- Installer is identified as containing virus by Microsoft Defender HOT 3
- Custom options section to avoid polluting the headers HOT 3
- Generate tap report directory structure too (mkdir -p)
- Crash when capturing 'Expires' cookie attribute
- Crash with `--json` option when capturing 'HttpOnly' and 'Secure' cookie attribute
- Equality on date not respected
- Typo in "issuer" field when exporting SSL certificates to JSON
- Normalise SSL certificate's issuer and subject
- Output is truncated when using --json and --output together HOT 1
- SPlit HTML/JUNIT report into test cases HOT 1
- Add option to print response bodies for each entry in file HOT 2
- Automatic pagination that continues until exhaustion HOT 4
- hurlfmt check always returns non-zero exit code HOT 3
- Improve error message when CLI option doesn't exist
- Type parsing error for [Options] items are not explicit
- How to run an interactive shell in the docker image ? HOT 4
- jsonpath: indexing inside of Filter expression does not work HOT 1
- Support secrets: things that should not be saved verbatim HOT 2
- Allow users to parameterize test
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 hurl.