swagger-api / swagger-api/swagger-codegen

Serializable import/implements to jaxrs-cxf spec models when serializableModel is set doesn't work

Open
#8,125 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

Serializable import/implements to jaxrs-cxf spec models when serializableModel is set doesn't work

Swagger-codegen version

2.3.1

Swagger declaration file content or url
Command line used for generation
<plugin>
	<groupId>io.swagger</groupId>
	<artifactId>swagger-codegen-maven-plugin</artifactId>
	<version>2.3.1</version>
	<executions>
		<execution>
			<phase>generate-sources</phase>
			<goals>
				<goal>generate</goal>
			</goals>
			<configuration>
				<output>${project.build.directory}/generated-sources</output>
				<inputSpec>${project.basedir}/src/main/resources/spec.yaml</inputSpec>
				<language>jaxrs-cxf</language>
				<generateApis>true</generateApis>
				<addCompileSourceRoot>false</addCompileSourceRoot>
				<generateApiTests>true</generateApiTests>
				<generateModels>true</generateModels>
				<modelPackage>com.company.api.datatypes</modelPackage>
				<apiPackage>com.company.api</apiPackage>
				<invokerPackage>com.company.api.impl</invokerPackage>
				<groupId>com.company</groupId>
				<artifactId>com.company.api</artifactId>
				<artifactVersion>1.0.0</artifactVersion>
				<verbose>true</verbose>
				<configOptions>
					<serializableModel>true</serializableModel>
				</configOptions>
			</configuration>
		</execution>
	</executions>
</plugin>

Doing the same while changing jaxrs-cxf to java produce classes that implements serializable

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the jaxrs-cxf generator configuration and templates, using the provided Maven setup with serializableModel enabled. Compare its generated models with the java generator's output, then verify that jaxrs-cxf models import and implement Serializable when the option is set.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.