Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Dean Sofer
    @ProLoser
    abao is all about querying a raml endpoint and then checking the response against the schema, but out of the box you can’t test the same endpoint more than once
    I was starting to build a sort of ‘Endpoint’ class or somethign that I would pass the raml definition to at construction and it would have some sort of endpoint.query({ param1: x, param2: y }) method.
    You could then take the response of the query and do endpoint.validate(response) or something and it’d give you a schema validation
    or validate the requesting body
    Christian Vogel
    @sichvoge
    I think the client generation project that Blake was, and still is, working on would help here. I'll let Blake and you sort it out. There is a branch with 1.0 support that would help you. @blakeembrey guess the raml-generator project would be base for what @ProLoser wants to do right?
    Dean Sofer
    @ProLoser
    keep in mind i don’t want to generate a server
    i want to generate a request
    but i would imagine that there might be some degree of shared logic
    Steven Hargrove
    @hulkish
    anyone around?
    I’m really hoping somebody can point me in the right direction
    is RAML 1.0 still too early to be using in production?
    Blake Embrey
    @blakeembrey
    what's up?
    i don't know if any of us can say that definitively
    but you'll definitely run into trouble parsing it and using it currently
    not everything is up to date and the spec is not yet final
    Steven Hargrove
    @hulkish
    I’m using webpack for my project, and have been tasked with implementing a development workflow that has a bit of automation for our RAML api’s as a local dev runtime with webpack
    gotcha
    ok so, lets assume I’m going with RAML 0.8 - And I’d like to have a way to test my api.raml on my client side UI via javascript
    Blake Embrey
    @blakeembrey
    what does it mean for you to test it?
    Steven Hargrove
    @hulkish
    @blakeembrey something like this…(moment please)
    Steven Hargrove
    @hulkish
    @blakeembrey in my client-side UI code, or to simplify… lets just say on my local dev environment I have just a index.html:
    […]
    <body>
    
      <script type=“text/javascript>
        jQuery.ajax( {
            url: ‘http://localhost/api/helloWorld',
            type: ‘GET',
            success: function( response ) {
                // response
            }
        } );
      </script>
    
    </body>
    </html>
    @blakeembrey and my raml…
    #%RAML 0.8
    title: my api
    version: v1
    baseUri: http://api.samplehost.com
    /helloWorld:
      get:
        responses:
          200:
            body:
              application/json:
                example: |
                  {
                    "message" : "Hello World"
                  }
    bear with me… perhaps something syntactically incorrect in these … but just for the sake of argument lets assume they’re correct
    Blake Embrey
    @blakeembrey
    ok, and, what next? what's testing look like for you here?
    just making http requests or writing unit tests or something bigger?
    Steven Hargrove
    @hulkish
    but, lets say im running a local web server and testing my index.html page… etc. In addition to this - while I make changes to my api.raml - I want to be able to test them as a local server
    both
    yes yes and yes lol
    Blake Embrey
    @blakeembrey
    sorry, it's just difficult to figure out what i'm answering rn :)
    so do you need these synchronised somehow?
    raml is just the description language between them
    do you want to mock the backend or something to test?
    Steven Hargrove
    @hulkish
    basically, I need a local server - something like this: https://github.com/isaacloud/local-api (although, this doesnt quite satisfy my needs)
    yes i need to mock the backend
    Blake Embrey
    @blakeembrey
    what more did you need? i hadn't seen that before, but it looks quite good
    Steven Hargrove
    @hulkish
    well, I’m new to raml and after just a bit of research that was the best option I’ve come across
    I guess I’m just hoping perhaps somebody knew of a solution thats even better, or any advice at all for that matter
    Blake Embrey
    @blakeembrey
    seems quite good, i'd built https://github.com/mulesoft-labs/osprey-mock-service in the past but it's not quite as complete on the mocking front
    Steven Hargrove
    @hulkish
    ah
    Steven Hargrove
    @hulkish
    @blakeembrey one more question… I was hoping you could shed some light on this: raml-org/raml-js-parser-2#96
    Blake Embrey
    @blakeembrey
    i can't answer that, sorry, you'll need to get an update from the team working on it
    Steven Hargrove
    @hulkish
    ok ty
    Christian Vogel
    @sichvoge
    @hulkish from your image i'd guess you got your answer from me already :)
    Patrick Housley
    @patrickhousley
    Hey everyone. I was wondering if there was anyone that could help with issue raml-org/raml-js-parser#182
    amritsinghbains
    @amritsinghbains

    schemas:

    • RetrieveIndividualListRs: !include jsd/RetrieveIndividualListXXRs.1.schema.json

    Can I know how to get the value "!include jsd/RetrieveIndividualListXXRs.1.schema.json" from raml file reader?

    I dont want the value of the file but the file name "....schemas.json"