Swagger-codegen: Add SparkJava server code generation

Created on 1 Jun 2017  路  11Comments  路  Source: swagger-api/swagger-codegen

Description

Add support for Spark Java (http://sparkjava.com/) server generation. Spark Java is a micro framework in Java, similar to Scalatra.

New generator Java help wanted

Most helpful comment

Hi, I'm running short on time this week again, but I'll try to take a look on that next weekend. Any question that arise I'll post here. Thank.

All 11 comments

@giflw thanks for the suggestion. May I know if you've time to contribute the generator for Spark Java?

If yes, I can show you some good starting points.

@wing328 I can try to do that. I just need some guidance.

Thanks for offering help to create the generator.

I think the Play generator or the MSF4J generator would be a good starting point:

Play: generator, templates
MSF4J: generator, templates

You can start by cloning one of these generators

https://github.com/swagger-api/swagger-codegen/pull/4943 (for Play generator) shows what files need to be added for a new Java server stub generator.

Let us know if you've any questions.

@giflw may I know if you need any help from us (the community) to create the SparkJava generator?

Hi, I'm running short on time this week again, but I'll try to take a look on that next weekend. Any question that arise I'll post here. Thank.

+1 this would be very helpful

@rvaidya may I know if you've time to contribute the generator? https://github.com/swagger-api/swagger-codegen/pull/6014/files is a good starting point on what files need to be added.

I've started on this fork https://github.com/giflw/swagger-codegen, branch sparkjava-generator. Help is appreciated :grinning:

@giflw do you mind submitting a PR so that we can review more easily?

I was just searching google to see if this integration exists. This initiative appears to have been abandoned... Any idea on if this will get picked back up?

Hi. I was trying to build that generator, but had changes in projects. One of problems that I was trying to solve was find a simple way to generate routes and register them in the way it's modelled by the generator. Spark simplest approach uses a single file with a main method to register routes. But the best way to model that in swagger generator would be one class per route.

Was this page helpful?
0 / 5 - 0 ratings