You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2022/08/25 18:55:53 UTC

[GitHub] [ignite-3] kgusakov commented on a diff in pull request #1028: IGNITE-16969 Add developer documentation to REST modules

kgusakov commented on code in PR #1028:
URL: https://github.com/apache/ignite-3/pull/1028#discussion_r955306253


##########
modules/rest-api/README.md:
##########
@@ -0,0 +1,31 @@
+# ignite-rest-api
+
+This module defines REST APIs that might be provided by Ignite 3. Also, common
+DTOs and error handlers are defined.
+
+## API definition
+
+The API definition is a java interface annotated with micronaut `@Controller`  
+annotations and several `swagger-annotations`. All those annotations are 
+needed to generate a valid [Open API spec](https://spec.openapis.org/oas/v3.1.0) from these interfaces.
+
+[ClusterManagementApi](src/main/java/org/apache/ignite/internal/rest/api/cluster/ClusterManagementApi.java) is an example of API definition.
+
+## Error handling
+
+Ignite 3 implements the [problem/json](https://www.rfc-editor.org/rfc/rfc7807.html) in all endpoints. That's why

Review Comment:
   Do you mean media type `application/problem+json`? If no, could you rename this link, because `any/any` looks like media type in the current scope?



##########
modules/rest-api/README.md:
##########
@@ -0,0 +1,31 @@
+# ignite-rest-api
+
+This module defines REST APIs that might be provided by Ignite 3. Also, common
+DTOs and error handlers are defined.
+
+## API definition
+
+The API definition is a java interface annotated with micronaut `@Controller`  
+annotations and several `swagger-annotations`. All those annotations are 
+needed to generate a valid [Open API spec](https://spec.openapis.org/oas/v3.1.0) from these interfaces.
+
+[ClusterManagementApi](src/main/java/org/apache/ignite/internal/rest/api/cluster/ClusterManagementApi.java) is an example of API definition.
+
+## Error handling
+
+Ignite 3 implements the [problem/json](https://www.rfc-editor.org/rfc/rfc7807.html) in all endpoints. That's why
+problem definition and common problem handling are defined in this module. Here is how it works:
+
+- `IgniteException` is thrown in any Ignite component

Review Comment:
   Could you attach the link for this class also?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org