tracker issue : CF-4200442

select a category, or use search below
(searches all categories and all time range)
Title:

Swagger Doc is not generated

| View in Tracker

Status/Resolution/Reason: To Fix//HaveNewInfo

Reporter/Name(from Bugbase): Mike Collins / Mike Collins ()

Created: 12/22/2017

Components: API Manager, Swagger

Versions: 2016

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: Updater5 /

Priority/Frequency: Normal / Some users will encounter

Locale/System: / Windows 10 64 bit

Vote Count: 0

Problem Description:
I added the following to my Application.cfc per the documentation and I am not seeing any swagger openapi doc generated.

Pretty much followed these instructions.
https://helpx.adobe.com/coldfusion/api-manager/swagger-support.html

No errors are reported in log files.

<cfset this.name = 'registrations'>
<cfset this.sessionmanagement = true>
<cfset this.sessionTimeout = CreateTimeSpan(0,3,0,0)> 
<cfset this.setclientcookies = true>
<cfset this.clientManagement="Yes">
<cfset this.clientStorage="cookie">
<cfset this.setDomainCookies = true>
<cfset this.datasource='registrations'>
<cfset this.customTagPaths = getdirectoryfrompath(gettemplatepath()) & "customtags" > 
<cfset this.serialization.preservecaseforstructkey = true>
<cfset this.serialization.serializeQueryAs = "struct" />

<cfset this.restsettings.generateRestDoc="true">
<cfset this.restsettings.restDocInfo.title="Registrations">
<cfset this.restsettings.restDocInfo.apiVersion="2.0">
<cfset this.restsettings.restDocInfo.description="this is description">
<cfset this.restsettings.restDocInfo.termOfServiceUrl="http://abc.com">
<cfset this.restsettings.restDocInfo.contact="xyz@adobe.com">
<cfset this.restsettings.restDocInfo.license="adobe 1.0">
<cfset this.restsettings.restDocInfo.licenseUrl="http://abc.com">
Steps to Reproduce:
Create a Rest Service with a parent Application.cfc then register or refresh the rest cfc.  Doc states that a new directory will be created called api-docs with json file.
Actual Result:
No files created
Expected Result:
JSon based file to be created.
Any Workarounds:
None

Attachments:

Comments:

Hi Mike ,   As 'restsettings.generateRestDoc' is set to 'true', the swagger doc should be generated (assuming there is no error in REST service). The API listing swagger doc can be seen at the URL <ColdFusion server URL path:port number>/rest/<Service Mapping name>/api-docs/<resourceName> The resource listing swagger doc can be seen at the URL <ColdFusion server URL path:port number>/rest/<Service Mapping name>/api-docs Also note that there is no JSON file created in the system. Can you confirm if this works for you ? Meanwhile we are reviewing the Swagger documentation.   Thanks, Nitin    
Comment by Nitin K.
155 | January 04, 2018 08:34:42 AM GMT