[ 
https://issues.apache.org/jira/browse/IGNITE-23501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vyacheslav Koptilin updated IGNITE-23501:
-----------------------------------------
    Labels: ignite-3  (was: )

> Implement default REST client
> -----------------------------
>
>                 Key: IGNITE-23501
>                 URL: https://issues.apache.org/jira/browse/IGNITE-23501
>             Project: Ignite
>          Issue Type: Epic
>          Components: rest
>            Reporter: Aleksandr
>            Priority: Major
>              Labels: ignite-3
>         Attachments: rest-scheme.jpg
>
>
> The REST interface is growing and the support of new endpoints getting messy. 
> What we do now to support, say, _/hello_ new endpoint:
> - go to _rest-api_ module and add new _HelloApi_ interface with proper 
> documentation and annotations
> - go to _rest_ module and implement the _HelloApi_ with a java class, 
> annotated with Controller
> - go to _rest_ module tests and write integration test for _HelloController_:
>     - but.. here we need REST client that we have to generate from OpenAPI 
> spec, so
>     - import generated client and write some code around generated one
>     - write tests and commit working solution!
> The next thing we do is the support for CLI command for new REST method, so 
> we:
> - go to _cli_ module and write some command-related code
> - somewhere inside we import the generated REST client and
> - write some code around generated one
> - go to cli tests and write some tests.
> As we can see, we write additional code both in _cli_ and _rest_ modules and 
> this code is the same code. 
> I suggest introducing _rest-client_ module that will implement the _rest-api_ 
> with clear and well-organized hand-written code. But use the generated rest 
> client inside just to validate our Open API is correct. We can even 
> distribute _rest-client_ as a separate "default" implementation for the 
> Ignite REST API. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to