ardielle / ardielle-tools

Apache License 2.0
18 stars 19 forks source link

Please add example support #82

Open geekybaiyi opened 7 years ago

geekybaiyi commented 7 years ago

hi,

can RDL support examples for fields, requests and responses? similar to what Sagger provides http://swagger.io/docs/specification/adding-examples/ Maybe also allow users to provide a short description/comments on the examples.

thx!

boynton commented 7 years ago

The "x_example" annotation is for this. The swagger importer already implements that. I think the generator just needs to preserve it. Also, structured type examples don't apparently work. Will try to fix this.

shichung commented 7 years ago

Hi, @boynton

could you help share if there is any update?

Thanks, SC

boynton commented 7 years ago

The examples will need to be encoded as JSON strings to be compatible with swagger. This is a bigger change than I initially thought, might take some days to get in place. If "x_example" attributes are used in the meantime, I'd recommend encoding as JSON, i.e. "x_example": "{\\"foo\\":23}"

shichung commented 7 years ago

Hi, @boynton

could you help also cover "rdl-gen-markdown" for RDL's markdown files generators?

Thanks, SC

boynton commented 7 years ago

Yes, I'll include markdown when adding this feature.

shichung commented 7 years ago

@boynton great! thanks for your help

geekybaiyi commented 6 years ago

@boynton any update on this issue ? can RDL support examples for fields, requests and responses? similar to what Sagger provides http://swagger.io/docs/specification/adding-examples/

boynton commented 6 years ago

No update yet, it hasn't been forgotten, though.

geekybaiyi commented 6 years ago

do you have an estimation on when this will be available ?

geekybaiyi commented 5 years ago

hi @boynton May I know what the overall plan and commitment on RDL are?

thx!

boynton commented 5 years ago

Hi @geekybaiyi, sorry about being away for so long, this is one of the enhancements that got left hanging last year. I now plan to implement OpenAPI3 import/export, and the examples would be part of that. It requires an RDL model change, which I've been resistant to. But I now plan a v2 of RDL to address this, as well as how the generators are implemented in the tooling. Other API management tools have come a long ways since I wrote RDL, so I will be more focused on inter-op moving forward, treating RDL largely an IDL to generate other formats.