Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Mateusz Łoskot
    @mloskot
    Does Ramses support modularized RAML documents?
    When using Atom's API Workbench package > Create New RAML Project, there is option to create folders structure
    f:\workshop\myapi>ls -1
    api.raml
    documentation
    examples
    notebooks
    resourceTypes
    schemas
    scripts
    securitySchemes
    traits
    I wonder if Ramses can work with such structure and numerous !include from the api.raml
    atom-api-workbench.png
    kalyan kuramana
    @kalyanbabu_iit_twitter
    you should look into ramlfications.parser.parse_raml
    Mateusz Łoskot
    @mloskot
    I skimmed that tool, but since I'm new to RAML and RESTful APIs at large, I'd prefer to not to dig to deep under Ramses pants :)
    kalyan kuramana
    @kalyanbabu_iit_twitter
    well thats the way i am learning, good thing about it is that its well structered
    so one doesnt gets lost in it
    Mateusz Łoskot
    @mloskot
    I'll keep single uber RAML file for the time being and might refactor when it grows.
    kalyan kuramana
    @kalyanbabu_iit_twitter
    i think you can maintain that structure using !includes , raml loader can resolve those
    kalyan kuramana
    @kalyanbabu_iit_twitter
    if you look at ramlfications/loader.py .it specifies that "Adds the ability to follow !include directives within RAML Files"
    i supports .yml, .yaml , .raml , .json extensions
    Mateusz Łoskot
    @mloskot
    Thanks @kalyanbabu_iit_twitter
    kalyan kuramana
    @kalyanbabu_iit_twitter
    imagine an order schema and i want to post more than one order i.e i want pass array of orders in request , is there a way to achieve this in ramses
    kalyan kuramana
    @kalyanbabu_iit_twitter
    ramses-tech/ramses#117
    kalyan kuramana
    @kalyanbabu_iit_twitter
    if it does not support ramses-tech/ramses#117 . isnt it violating rest principle
    Jonathan Stoikovitch
    @jstoiko
    kalyan kuramana
    @kalyanbabu_iit_twitter
    if i use list field , it will create multiple orders lists
    or i have to create a dummy endpoint to receive orders as a list and update orders doc using event handler
    kalyan kuramana
    @kalyanbabu_iit_twitter
    what i am saying if es has a mapping Order and i post array of orders , it should be updated to index a multiple Order documents by principle of rest
    isnt it
    Jonathan Stoikovitch
    @jstoiko
    yes, if you post an array to an endpoint that has an array/list field, it will embed that array inside that field. if it doesn't, then there might be a problem with your schema.
    kalyan kuramana
    @kalyanbabu_iit_twitter
    yes, it will update that list field but i cannot access each individual order through enndpoint

    i tried that as well what happens is that i cannot create individual endpoints for each order , since multiple lists are created

    example :
    POST : /Orders -d '[ <10 orders> ]'

    response : will give a doc which has 10 orders

    now i do another request of similar type as above ,

    resposne : will give another doc which has 10 orders

    i cannot query like /Orders/{orderID}

    Jonathan Stoikovitch
    @jstoiko
    make sure it has the proper definition, and make sure to Deere both your DB and ES index in between changes to your schemas as Ramses will need to rebuild the mapping schemas-to-(db_schema|es_mapping)
    kalyan kuramana
    @kalyanbabu_iit_twitter
    isnt it?
    Jonathan Stoikovitch
    @jstoiko

    POST is meant for creating 1 resource at a time, see https://tools.ietf.org/html/rfc2616#page-54. If you really need an endpoint that creates resources in bulk, it will be a bit trickier to achieve but I would suggest you do this using custom endpoint using Nefertari directly instead of Ramses. I would suggest you stick to the 1 POST = 1 resource logic for now.

    So, in your case,POST to your /orders endpoint should contain only 1 order object at a time, not an array. This way your "order" schema will be easier to design as it will contain the exact representation of 1 order object.

    kalyan kuramana
    @kalyanbabu_iit_twitter
    ok cool thanks ,
    Jonathan Stoikovitch
    @jstoiko
    np, good luck!
    kalyan kuramana
    @kalyanbabu_iit_twitter
    have looked at the other issue
    (you
    *yoy
    *you
    Jonathan Stoikovitch
    @jstoiko
    I will
    kalyan kuramana
    @kalyanbabu_iit_twitter
    cool
    christopheblin
    @christopheblin
    hi all
    I'd like to start using ramses on mac os but after creating the virtualenv described in the getting started I have an error that I do not understand, can someone help ?
    christopheblin
    @christopheblin
    never mind, I've solved my error
    now I'd like to know how can I regenerate my postgres db when I change a schema ?
    Jonathan Stoikovitch
    @jstoiko
    you can drop your DB and DELETE your elasticsearch index. Ramses will recreate this for you, using the new schema to create the table schema in Postgres and the mappings in ES.
    James Healy
    @StoicNZ_twitter
    Hey all, any plans to support RAML 1.0?
    Jonathan Stoikovitch
    @jstoiko
    for sure! this is highly dependent on the underlying parser, Ramlfications, and you can follow the progress here: https://github.com/spotify/ramlfications/wiki/RAMLfications-v0.2.0-Release
    James Healy
    @StoicNZ_twitter
    Ah, didn't realise Spotify works with RAML. Very cool.
    bigmodem
    @bigmodem
    I want to add ramses to my exist pyramid based web site, how can i change local.ini that I get a '/api/' for ramses views and '/' for other pyramid routes?
    bigmodem
    @bigmodem
    When will ramses support JSONB column type from PostgreSQL 9.5 ? I want to use incremental update for a dict field in a PUT method.
    kalyankuramana
    @kalyankuramana
    why is the indexing of value of fields of type dict is disabled by default, how to query for fields inside a dict object
    should i use regex or enable it
    Charlene Gilbert
    @gilbcharlene
    I am trying to run the example from: https://www.elastic.co/blog/make-an-elasticsearch-powered-rest-api-for-any-data-with-ramses. Can I use mongodb instead of postgresql? I selected mongodb and tried to start the server but I get the following message " The 'gii_api' distribution was not found and is required by the application"
    kalyankuramana
    @kalyankuramana
    could you post the trace of error