<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Swagger documentation for custom REST API in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/swagger-documentation-for-custom-rest-api/m-p/78039#M24459</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;in our ACS-based projects we usually&amp;nbsp;develop&amp;nbsp;many custom REST APIs using the default extension points provided by Alfresco:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;XML descriptor (*.desc.xml)&lt;/LI&gt;&lt;LI&gt;JAVA controller (extending&amp;nbsp;org.springframework.extensions.webscripts.DeclarativeWebScript)&lt;/LI&gt;&lt;LI&gt;JS controller&lt;/LI&gt;&lt;LI&gt;FTL templates&lt;/LI&gt;&lt;LI&gt;ecc&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to know if&amp;nbsp;there is a way to document our custom APIs using Swagger and OAS (OpenAPI Specification) without handwriting the related YAML/JSON documentation files.&lt;/P&gt;&lt;P&gt;Swagger provide a rich framework to automatically produce API documentation&amp;nbsp;by adding specific Java annotations to controllers but I don't&amp;nbsp;find a way to use this framework with Alfresco&amp;nbsp;WebScript.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Furthermore, we&amp;nbsp;would like to easily use the "API first" approach (&lt;A class="link-titled" href="https://www.easyitblog.info/2017/01/08/api-first-approach-with-swagger/" title="https://www.easyitblog.info/2017/01/08/api-first-approach-with-swagger/" rel="nofollow noopener noreferrer"&gt;API First approach with Swagger&lt;/A&gt;) in our ACS-based projects so it would be also really important for us to find a way to produce REST APIs from the Swagger documentation files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How does Alfresco&amp;nbsp;handle API documentation in&amp;nbsp;Alfresco REST API Explorer (&lt;A class="link-titled" href="https://github.com/Alfresco/rest-api-explorer" title="https://github.com/Alfresco/rest-api-explorer" rel="nofollow noopener noreferrer"&gt;GitHub - Alfresco/rest-api-explorer: Public REST API Explorer&lt;/A&gt;)?&lt;/P&gt;&lt;P&gt;In GitHub I found the YAML definition files (&lt;A class="link-titled" href="https://github.com/Alfresco/rest-api-explorer/tree/master/src/main/webapp/definitions" title="https://github.com/Alfresco/rest-api-explorer/tree/master/src/main/webapp/definitions" rel="nofollow noopener noreferrer"&gt;https://github.com/Alfresco/rest-api-explorer/tree/master/src/main/webapp/definitions&lt;/A&gt;) but I have no idea how Alfresco produces/maintains these files and if these files are also used to automatically produce WebScript&amp;nbsp;definition components (at least the java controllers).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Mar 2018 12:43:33 GMT</pubDate>
    <dc:creator>luca_ow</dc:creator>
    <dc:date>2018-03-29T12:43:33Z</dc:date>
    <item>
      <title>Swagger documentation for custom REST API</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/swagger-documentation-for-custom-rest-api/m-p/78039#M24459</link>
      <description>Hi,in our ACS-based projects we usually&amp;nbsp;develop&amp;nbsp;many custom REST APIs using the default extension points provided by Alfresco:XML descriptor (*.desc.xml)JAVA controller (extending&amp;nbsp;org.springframework.extensions.webscripts.DeclarativeWebScript)JS controllerFTL templateseccI would like to know if&amp;nbsp;ther</description>
      <pubDate>Thu, 29 Mar 2018 12:43:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/swagger-documentation-for-custom-rest-api/m-p/78039#M24459</guid>
      <dc:creator>luca_ow</dc:creator>
      <dc:date>2018-03-29T12:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: Swagger documentation for custom REST API</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/swagger-documentation-for-custom-rest-api/m-p/78040#M24460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;About the 'API first approach':&amp;nbsp;&lt;/P&gt;&lt;P&gt;There already is some tooling around to generate&amp;nbsp;source code from OpenAPI / Swagger documentation, e.g. &lt;A href="https://github.com/swagger-api/swagger-codegen" rel="nofollow noopener noreferrer"&gt;swagger-api/swagger-codegen&lt;/A&gt; or &lt;A href="https://github.com/OpenAPITools/openapi-generator" rel="nofollow noopener noreferrer"&gt;OpenAPITools/openapi-generator&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;From my experience with these tools, I think it might be possible to use it in the context of Alfresco if the generators are provided with the correct templates.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I&amp;nbsp;wonder if someone already tried creating&amp;nbsp;such templates for auto-generating Alfresco WebScripts? Might be a good Hack-a-thon project :-)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jul 2019 08:24:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/swagger-documentation-for-custom-rest-api/m-p/78040#M24460</guid>
      <dc:creator>kerkhofsd</dc:creator>
      <dc:date>2019-07-19T08:24:02Z</dc:date>
    </item>
  </channel>
</rss>

