Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #5386
Closed
Open
Issue created Feb 20, 2020 by Jorge Rodríguez Martín@jorgerodContributor

[BUG] [JAVA | Spring] Cookie in parameter is not correctly generated

Description

When trying to do code generation with cookie in parameter yaml file, uncompilable code are being generated and generator does not report error.

openapi-generator version

openapi-generator-maven-plugin 4.2.3

OpenAPI declaration file content or url
 /products:
    get:
      tags: 
        - products
      summary: List all products
      operationId: listProducts
      parameters:
        - in: cookie
          name: debug
          schema:
            type: string
            default: ""
        - in: query
          name: page
          description: Specify which page shall be returned. Default value is 0.
          required: false
          schema:
            type: integer
            format: int32
            default: 0
Command line used for generation
			<plugin>
				<groupId>org.openapitools</groupId>
				<artifactId>openapi-generator-maven-plugin</artifactId>
				<version>4.2.3</version>
				<executions>
					<execution>
						<goals>
							<goal>generate</goal>
						</goals>
						<configuration>
							<inputSpec>${project.basedir}/src/main/resources/email-api.yaml</inputSpec>
							<generatorName>spring</generatorName>
							<configOptions>
								<java8>true</java8>
								<dateLibrary>java8</dateLibrary>
								<interfaceOnly>true</interfaceOnly>
								<useSwaggerAnnotations>false</useSwaggerAnnotations>
								<generatPom>false</generatPom>
							</configOptions>
							<output>${project.basedir}</output>
							<apiPackage>...</apiPackage>
							<modelPackage>...</modelPackage>
						</configuration>
					</execution>
				</executions>
			</plugin>
Steps to reproduce

Using maven to trigger the generation. While I believe this is something to do with generator itself instead of the maven plug-in.

Related issues/PRs

https://github.com/OpenAPITools/openapi-generator/issues/2908

Assignee
Assign to
Time tracking