All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.reprezen.genflow.openapi3.doc.ParamDoc.xtend Maven / Gradle / Ivy

package com.reprezen.genflow.openapi3.doc

import com.reprezen.genflow.openapi3.doc.StructureTable.ParameterStructureTable
import com.reprezen.kaizen.oasparser.model3.OpenApi3
import com.reprezen.kaizen.oasparser.model3.Parameter

class ParamDoc {
	extension HtmlHelper = HelperHelper.htmlHelper

	val String name
	val OpenApi3 model = HelperHelper.model

	new(OpenApi3 model, String name) {
		this.name = name
	}

	def getHtml() {
		val param = model.parameters.get(name)
		'''
			
			

«name»

«model.parameters.get(name).paramHtml»
''' } def paramHtml(Parameter param) { nonBodyParamHtml(param) } def nonBodyParamHtml(Parameter param) { val table = new ParameterStructureTable(param, #["name", "Name"], #["in", "In"], #["default", "Default"], #["type", "Type"], #["doc", "Description"]) table.render(param.name) } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy