<div dir="ltr">OK thanks! I'll try updating a few locally and see how it goes.<div><br></div><div>d</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Sep 20, 2020 at 2:00 PM Mayo, Dave <<a href="mailto:dave_mayo@harvard.edu" target="_blank">dave_mayo@harvard.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-US">
<div>
<p class="MsoNormal">I think it’s briefly covered in the video tutorials, but there’s no reason you should have to go pick through them.
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">To summarize, the examples are actually built during the build process that generates the documentation.  Specifically, they’re created using the FactoryBot test mock factories (defined here
<a href="https://github.com/archivesspace/archivesspace/blob/master/backend/spec/factories.rb" target="_blank">
https://github.com/archivesspace/archivesspace/blob/master/backend/spec/factories.rb</a>), during the portion of building the docs that lives in the test harness (here:
<a href="https://github.com/archivesspace/archivesspace/blob/master/backend/spec/documentation_spec.rb" target="_blank">
https://github.com/archivesspace/archivesspace/blob/master/backend/spec/documentation_spec.rb</a>).<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">This gets saved to two files, I believe in the root directory of the project:
<br>
<br>
<u></u><u></u></p>
<p class="MsoNormal">endpoint_examples.json.<u></u><u></u></p>
<p class="MsoNormal">endpoint_examples_problems.json<u></u><u></u></p>
<p class="MsoNormal"><u></u><u></u></p>
<p class="MsoNormal">The examples that show up defined in code are the ones that someone’s added to override the ones generated automatically by this method, i.e. the thing we’re doin’ in this project!
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">The automated _<i>documentation</i>_, on the other hand, Is generated based on properties of the endpoint (i.e. whether it’s paginated or deprecated) and is in the ERB template that generates the Slate documentation. I can describe it in
 more depth if need be, but fundamentally I think the mechanism doesn’t matter to the project – I’d recommend just looking at the published docs to see if the examples or documentation are sufficient, and then going to the code or putting docs/examples in the
 spreadsheet as needed.  <u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">--<u></u><u></u></p>
<p class="MsoNormal">Dave Mayo (he/him)<u></u><u></u></p>
</div>
<p class="MsoNormal">Senior Digital Library Software Engineer<br>
Harvard University > HUIT > LTS<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(181,196,223);padding:3pt 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12pt;color:black">From: </span></b><span style="font-size:12pt;color:black"><<a href="mailto:archivesspace_api_doc_adhoc-bounces@lyralists.lyrasis.org" target="_blank">archivesspace_api_doc_adhoc-bounces@lyralists.lyrasis.org</a>> on behalf of "David W. Hodges" <<a href="mailto:dwh2128@columbia.edu" target="_blank">dwh2128@columbia.edu</a>><br>
<b>Reply-To: </b>"<a href="mailto:archivesspace_api_doc_adhoc@lyralists.lyrasis.org" target="_blank">archivesspace_api_doc_adhoc@lyralists.lyrasis.org</a>" <<a href="mailto:archivesspace_api_doc_adhoc@lyralists.lyrasis.org" target="_blank">archivesspace_api_doc_adhoc@lyralists.lyrasis.org</a>><br>
<b>Date: </b>Sunday, September 20, 2020 at 11:10 AM<br>
<b>To: </b>"<a href="mailto:archivesspace_api_doc_adhoc@lyralists.lyrasis.org" target="_blank">archivesspace_api_doc_adhoc@lyralists.lyrasis.org</a>" <<a href="mailto:archivesspace_api_doc_adhoc@lyralists.lyrasis.org" target="_blank">archivesspace_api_doc_adhoc@lyralists.lyrasis.org</a>><br>
<b>Subject: </b>[Archivesspace_api_doc_adhoc] Question about routes and examples<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Hi all. OK, after some struggle I managed to build the docs anew on my Mac. So far so good! (BTW, if anyone is good at this on Linux I'd appreciate any help, as I tried on Ubuntu but ran into a cascade of errors and gave up; I'd like to
 get this working on that machine eventually though.)<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Looking at a few routes, I am unsure where exactly the code examples are (or should be) stored. In some cases the code is in the .rb file, but in others it isn't. For example, the entry for "<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__archivesspace.github.io_archivesspace_api_-3Fshell-23get-2Da-2Dlist-2Dof-2Dsystem-2Dusers&d=DwMFaQ&c=WO-RGvefibhHBZq3fL85hQ&r=_Mv1dY22K7jvT5MD7xjbvGVzRDOUMhx4WYcnPSIzYnE&m=lXXvcKi5ALsf7jeGlOk3EwMIOxz7Yo8ymlyFcn9GTxM&s=j7X0iyj357P3BU0v0VQcCgH98PnLZMimRGInlfCTDkU&e=" target="_blank">Get
 a list of system users</a>" shows a simple Curl example. But looking at <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_archivesspace_archivesspace_blob_master_backend_app_controllers_users.rb-23L70&d=DwMFaQ&c=WO-RGvefibhHBZq3fL85hQ&r=_Mv1dY22K7jvT5MD7xjbvGVzRDOUMhx4WYcnPSIzYnE&m=lXXvcKi5ALsf7jeGlOk3EwMIOxz7Yo8ymlyFcn9GTxM&s=mZJ5zna87MBEhFDoyM8CbE3CsjXUSI5ndjmk90yVI_E&e=" target="_blank">
users.rb</a>, there is no .example code that I can find. Whereas in other routes like Dave showed, the examples are right there in the controller adjacent to the other route documentation.<u></u><u></u></p>
</div>
<div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I recall something about the "prepend" attribute and determining whether things overwrite existing documentation or not (presumably in the markdown file index.md, I guess?). Is that what's going on here? I had thought the markdown was generated
 downstream from the controllers, but is it more of a merge from two different sources? <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">And for the sake of maintainability, should we strive to make the documentation more uniform and single-source? I'm not really familiar with best practices here, just wondering more from a documentation management perspective.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Any hints would be appreciated. If this is all covered in the video tutorials I'll go back and listen more carefully ;) <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Thanks, I'm looking forward to getting started for real and making progress!<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">David<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal">-- <u></u><u></u></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10pt;color:rgb(153,153,153)">David W. Hodges</span><span style="font-size:10pt"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10pt;color:rgb(153,153,153)">Special Collections Analyst</span><span style="font-size:10pt"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10pt;color:rgb(153,153,153)">Columbia University Libraries</span><span style="font-size:10pt"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10pt;color:rgb(153,153,153)">Butler Library</span><span style="font-size:10pt"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10pt;color:rgb(153,153,153)">535 West 114th St.</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10pt;color:rgb(153,153,153)">New York, NY 10027</span><span style="font-size:10pt"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10pt;color:rgb(153,153,153)">212 854-8758</span><span style="font-size:10pt"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10pt;color:black"><u></u> <u></u></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

_______________________________________________<br>
Archivesspace_api_doc_adhoc mailing list<br>
<a href="mailto:Archivesspace_api_doc_adhoc@lyralists.lyrasis.org" target="_blank">Archivesspace_api_doc_adhoc@lyralists.lyrasis.org</a><br>
<a href="http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_api_doc_adhoc" rel="noreferrer" target="_blank">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_api_doc_adhoc</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div style="font-size:13px"><font color="#999999">David W. Hodges</font></div><div style="font-size:13px"><font color="#999999">Special Collections Analyst</font></div><div style="font-size:13px"><font color="#999999">Columbia University Libraries</font></div><div style="font-size:13px"><span style="color:rgb(153,153,153)">Butler Library</span><br></div><div><font color="#999999"><span style="font-size:13px">535 West 114th St.</span></font><br></div><div style="font-size:13px"><font color="#999999">New York, NY 10027</font></div><div style="font-size:13px"><font color="#999999">212 854-8758</font></div><div style="font-size:13px;color:rgb(0,0,0)"><br></div></div></div></div></div></div></div></div></div></div></div></div>