LiveRamp / reslang

A language for describing resource-oriented APIs & turning them into Swagger or resource diagrams. Oriented around the concepts we want to expose in the APIs.
Apache License 2.0
23 stars 7 forks source link

Define return type arrays #70

Closed khardaw closed 4 years ago

khardaw commented 4 years ago

When overriding 200 responses I'd like to be able to define an array of a structure as a return type.

I think this might be a bug as I am unable to return arrays of primitive types (string, int) on a 200 as well.

For example, I'd like to return an array of ActionOutput

structure ActionOutput {
    id: uuid
}```

The endpoint would look like this. 
/operations 
    POST
        "Success" 200
            ActionOutput[] ```
liveandrew commented 4 years ago

hmm just put it into a structure - i don't want to get into the full space of putting modifiers at this place in the grammar.

e.g. structure ActionOutputs { outputInfo: ActionOutput[1..10] }

etc

khardaw commented 4 years ago

Ok I will use structures to define this.