[ 
https://issues.apache.org/jira/browse/CASSANDRASC-22?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17094920#comment-17094920
 ] 

Jon Haddad commented on CASSANDRASC-22:
---------------------------------------

To elaborate a little - with the static api specification, we can generate 
client libraries as part of our build process by doing the following:
{noformat}
plugins {
    id 'org.hidetake.swagger.generator' version '2.18.0'
}

ext {
    v1Spec = file('src/api.yaml')
}

swaggerSources {
    python {
        inputFile = v1Spec
        code {
            language = "python"
        }
    }
    
}

dependencies {
    swaggerUI 'org.webjars:swagger-ui:3.10.0'
    swaggerCodegen 'io.swagger.codegen.v3:swagger-codegen-cli:3.0.5'
}
{noformat}
Since we don't need the client to run the application itself, it's fine if we 
generate the api after we run the main build.

Now to complicate things, we can (and should) use our own generated clients to 
test the server instead of hitting endpoints directly (CASSANDRASC-19). To 
accomplish this, we will need to pull in the generated clients as part of the 
build / test process for the integration tests. This isn't hard - but does 
require we have the api dumped out somewhere between the build and integration 
test tasks, as far as I can tell.

So if you're able to put the api.yaml somewhere, it would make life a bit 
easier for the next steps.

> RESTEasy integration for Cassandra Sidecar
> ------------------------------------------
>
>                 Key: CASSANDRASC-22
>                 URL: https://issues.apache.org/jira/browse/CASSANDRASC-22
>             Project: Sidecar for Apache Cassandra
>          Issue Type: Improvement
>          Components: Rest API
>            Reporter: Dinesh Joshi
>            Assignee: Dinesh Joshi
>            Priority: Normal
>         Attachments: image-2020-04-27-22-59-40-060.png
>
>
> Add support for JAX-RS based routing via RESTEasy to Cassandra Sidecar. This 
> also dynamically generates swagger documentation and adds the swagger UI.
> [Branch|https://github.com/dineshjoshi/cassandra-sidecar/tree/resteasy-swagger]
> [Tests|https://circleci.com/workflow-run/a7888146-a22d-45af-983a-8833b77eef59]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to