Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add example support #82

Open
geekybaiyi opened this issue Jun 26, 2017 · 11 comments
Open

Please add example support #82

geekybaiyi opened this issue Jun 26, 2017 · 11 comments
Assignees

Comments

@geekybaiyi
Copy link

geekybaiyi commented Jun 26, 2017

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
Copy link
Collaborator

boynton commented Jun 30, 2017

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.

@boynton boynton self-assigned this Jun 30, 2017
@shichung
Copy link

shichung commented Jul 6, 2017

Hi, @boynton

could you help share if there is any update?

Thanks,
SC

@boynton
Copy link
Collaborator

boynton commented Jul 6, 2017

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
Copy link

Hi, @boynton

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

Thanks,
SC

@boynton
Copy link
Collaborator

boynton commented Jul 13, 2017

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

@shichung
Copy link

@boynton
great!
thanks for your help

@geekybaiyi
Copy link
Author

@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
Copy link
Collaborator

boynton commented Sep 20, 2018

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

@geekybaiyi
Copy link
Author

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

@geekybaiyi
Copy link
Author

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

thx!

@boynton
Copy link
Collaborator

boynton commented Jan 23, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants