[
https://issues.apache.org/jira/browse/CASSANDRASC-22?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17094679#comment-17094679
]
Jon Haddad edited comment on CASSANDRASC-22 at 4/28/20, 4:48 PM:
-----------------------------------------------------------------
Yifan - I originally had the same thought, but am OK with not doing it here.
The api docs were already generated and committed in source prior to the patch,
this patch just regenerates them. I think we can keep the scope of the patch
to a minimum and produce a follow up to improve how doc generation works. I
already have a WIP patch to address this, and I think it's fine if we keep the
current behavior rather than trying to jam multiple changes into 1 patch.
Overall this is a solid improvement. I have a couple comments:
1. Since this changes the way routes are defined, it would be nice if it was
documented in {{docs/src/development.adoc}}, specifically a new section under
## Development (does not exist yet) / ### How to create a new endpoint.
2. Using the swagger annotations is much nicer than defining the api in a yaml
and hoping it conforms. I think this will reduce development headache as the
api improves. As we discussed earlier, it has the potential to lead to an api
being changed accidentally since the api is dynamic. I believe we arrived at a
good solution for this by testing trunk clients against the published api, so
I'd just like to get a JIRA in as a dependency for 1.0 to ensure we don't break
the 1.0 api after we release 1.0 of the project. No rush on this and not
something we need to do in this patch.
3. It's nice to see the improvements in the integration tests to use Guice,
specifically with the IntegrationTestModule.
was (Author: rustyrazorblade):
The docs were already generated prior to the patch, this patch just regenerates
them. I think we can keep the scope of the patch to a minimum and produce a
follow up to improve how doc generation works. I already have a WIP patch to
address this, and I think it's fine if we keep the current behavior rather than
trying to jam multiple changes into 1 patch.
Overall this is a solid improvement. I have a few comments:
1. Since this changes the way routes are defined, it would be nice if it was
documented in {{docs/src/development.adoc}}, specifically a new section on "how
to create a new endpoint".
2. Using the swagger annotations is much nicer than defining the api in a yaml
and hoping it conforms. I think this will reduce development headache as the
api improves. As we discussed earlier, it has the potential to lead to an api
being changed accidentally since the api is dynamic. I believe we arrived at a
good solution for this by testing trunk clients against the published api, so
I'd just like to get a JIRA in as a dependency for 1.0 to ensure we don't break
the 1.0 api after we release 1.0 of the project. No rush on this and not
something we need to do in this patch.
3. It looks like we no longer have access to the RoutingContext. On the
surface this doesn't seem like a problem, but I was considering depending on it
for CASSANDRA-17. When we move to controlling multiple Cassandra instances,
I'll need to move around the CQLSession (since it will depend on which C* node
we're controlling) I'm not very familiar with resteasy, do you know if
there's something similar? If not, I may need to register the multiple
instances of the same class to several endpoints with one prefix for each C*
server (probably easier tbh), but I'd like your opinion if you have one.
> 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]