Stream: committers
Topic: how to add multiple examples to operations
Eric Haas (Feb 23 2017 at 21:51):
How do I add more than one example of an operation using the 'Example.request' and 'Example.reponse' columns? Use a delimiter? is it even possible?
Grahame Grieve (Feb 24 2017 at 18:50):
just put more than one example in the example file
Bryn Rhodes (Feb 24 2017 at 19:04):
There's an example of how to do it in the ServiceDefinition$evaluate operation examples.
Bryn Rhodes (Feb 24 2017 at 19:04):
It doesn't quite render 100% though...
Eric Haas (Feb 26 2017 at 20:54):
@Bryn Rhodes this is not working for me I just a single text blob in <pre> for the examples and only the third example text as rendered html?
what is the secret?
Bryn Rhodes (Feb 26 2017 at 22:01):
The examples don't render 100% correctly for me, but here's the result:
Bryn Rhodes (Feb 26 2017 at 22:01):
http://build.fhir.org/servicedefinition-operations.html
Bryn Rhodes (Feb 26 2017 at 22:02):
In the sheet I have Example.Request and Example.Response columns that point to the $evaluate-request.txt and $evaluate-response.txt source files.
Bryn Rhodes (Feb 26 2017 at 22:02):
In the ServiceDefinition directory.
Bryn Rhodes (Feb 26 2017 at 22:03):
In there, I include both examples, separated by a line of dashes.
Bryn Rhodes (Feb 26 2017 at 22:08):
And in fact, looking at it again, I didn't have a line of dashes in the response.txt, so that's why it wasn't rendering correctly, so I just fixed that and now it works.
Eric Haas (Feb 26 2017 at 22:10):
not working for me ... do you have to run the full build to see the proper rendering?
Eric Haas (Feb 26 2017 at 22:12):
I think its a carriage return issue are you mac or windows?
Bryn Rhodes (Feb 26 2017 at 22:48):
Windows
Bryn Rhodes (Feb 26 2017 at 22:49):
No, I only had to run a partial.
Eric Haas (Feb 26 2017 at 23:12):
hmm the only difference I see is that I don't ref xml files. I'll commit and see if rendered differently
Bryn Rhodes (Feb 27 2017 at 03:01):
I do have an example that references JSON and still works.
Last updated: Apr 12 2022 at 19:14 UTC