com.reprezen.genflow.openapi3.doc.ResponseHelper.xtend Maven / Gradle / Ivy
/*******************************************************************************
* Copyright © 2013, 2016 Modelsolv, Inc.
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains the property
* of ModelSolv, Inc. See the file license.html in the root directory of
* this project for further information.
*******************************************************************************/
package com.reprezen.genflow.openapi3.doc
import com.reprezen.kaizen.oasparser.model3.Response
class ResponseHelper implements Helper {
extension HtmlHelper htmlHelper
override init() {
htmlHelper = HelperHelper.htmlHelper
}
def getHeadersHtml(Response response) {
val headers = response.headers
if (headers !== null && !headers.empty) {
'''
Name Type Description
«FOR header : headers.entrySet»
«header.key» «header.value?.schema.type» «header.value?.description?.htmlEscape»
«ENDFOR»
'''
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy