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
    @sichvoge i was trying to get datatypes setup
    and security schemes
    since i am always adding the same security payload everywhere
    Christian Vogel
    @sichvoge
    ok - data types are not supported in .8; so thats out of question
    the only thing i can tell you right now is that we are working on getting a real open source version out to the community asap. we need to make some adjustments though, and that takes some time we need to take to get something high quality out and people can also contribute easily
    Dean Sofer
    @ProLoser
    anyone here use abao?
    i'm seeing a weird behavior where the endpoint i want to test is being duplicated in the query
    Dean Sofer
    @ProLoser
    Anyone around?
    I am wondering what's the easiest way to build an http request out of a raml object
    Christian Vogel
    @sichvoge
    What exactly do you want to achieve? Can you describe it in a bit more detail?
    I have some guesses, but it would be good to get that confirmed first :)
    Dean Sofer
    @ProLoser
    I simply want to digest a raml definition file and in node perform a request out of the raml endpoint
    since abao is extremely limited it seems to me
    Dean Sofer
    @ProLoser
    While the parser gives me a js object for me to use, i’m still tasked with essentially converting this pojo into a request-friendly object, such as swapping out tokens/params and adding security
    Blake Embrey
    @blakeembrey
    it's not really supported right now, there is a client generation project though
    do you just want to convert a single endpoint at a time, or multiple?
    this is something i'm definitely interested in lately, so more details is very very helpful as i only have an idea of what i want to exist so far
    some other things i've been thinking on to is strongly typed http requests and responses modelled from raml in node (e.g. using typescript definitions)
    Dean Sofer
    @ProLoser
    I want to build an alternative to abao as I find it’s implementing frustrating to use
    this means that for each endpoint I’d have a ready-to-go request object or… thing that i can just execute with parameters specified
    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?
    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
    Blake Embrey
    @blakeembrey
    just making http requests or writing unit tests or something bigger?
    Steven Hargrove
    @hulkish
    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?