Giter Site home page Giter Site logo

Improved response validation about strest HOT 5 CLOSED

eykrehbein avatar eykrehbein commented on July 29, 2024 4
Improved response validation

from strest.

Comments (5)

eykrehbein avatar eykrehbein commented on July 29, 2024 4

@bmcminn good points!
I want to add another option: To use the already existing Syntax pattern Type(...) and Value(...) and just add another pattern to this family. It could be Code(200 | 201) for hard-coded response codes or simply Code(200-299) or Code(2xx) for response code ranges.

from strest.

bmcminn avatar bmcminn commented on July 29, 2024

I dig the concept of scoping response ranges, however you suggested syntax is not valid YAML. Plus, it's a little esoteric for folks not immediately familiar with mathematical range notations, but documentation can help with that.

Stringifying the value like code: "[400-500)" could work better since this is valid YAML and it being of type string informs the config parser it's a range value.

from strest.

eykrehbein avatar eykrehbein commented on July 29, 2024

Code validation

from strest.

palsivertsen avatar palsivertsen commented on July 29, 2024

syntax is not valid YAML
I forgot to validate the file, of course syntax should be valid YAML. Range could have a more basic form: code: "200-299"

from strest.

jgroom33 avatar jgroom33 commented on July 29, 2024

resolved with #42

from strest.

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.