swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
Hi everyone, I try to create my own template (api.mustache) in order to generate a .jmx (Jmeter test file) to test my API REST.
My problem is to collect aproperties of a body type object parameter.
Here is a part of my .yaml :
/dossiers/{dossierId}/dossiers:
post:
tags:
- DossierService
summary: Ajouter un sous-dossier.
operationId: addDossier
consumes:
- application/json
produces:
- application/json
parameters:
- name: dossier
in: body
required: true
schema:
type: object
required:
- name
properties:
name:
type: string
maxLength: 200
description: Le nom du nouveau dossier.
I want to extract the string "name" who is in properties of parameter "Dossier", but I can't do that...
When I use this code in my api.mustache, my variable {{basename}} is equal at "Dossier"...
I used DebugOperation et DebugModel to identify which variable I can use and i see my name variable in DebugModel but I can't use it (I tried use {{#models}}, {{#model}}, {{#var}}, etc...)
hey @mickteul i'm not familiar with Jmeter, but trying with Java language. i saw that as a body a model class (Dossier) is created as a bodyParam, maybe that can give you a guide.
Hi everyone, I try to create my own template (api.mustache) in order to generate a .jmx (Jmeter test file) to test my API REST. My problem is to collect aproperties of a body type object parameter.
Here is a part of my .yaml :
I want to extract the string "name" who is in properties of parameter "Dossier", but I can't do that...
When I use this code in my api.mustache, my variable {{basename}} is equal at "Dossier"...
I used DebugOperation et DebugModel to identify which variable I can use and i see my name variable in DebugModel but I can't use it (I tried use {{#models}}, {{#model}}, {{#var}}, etc...)
Somebody can help me ??
Mickael
Swagger-codegen version --> swagger-codegen-2.3.1