-
Notifications
You must be signed in to change notification settings - Fork 678
Coding for product REST APIs
Client is the source where the invocations to the API is made; for example :Consider the API Manager UI. Within the carbon-apimgt source code you will meet the Implementation for product REST APIs and corresponding backend implementation.

Following is a code structure for REST APIs provided by the WSO2 API Manager. In each component which exposes a REST API, there's a .yaml file containing its' definition. Whenever you need to make modifications to the product REST APIs this is the place you should change as the first step.

After doing the required code changes to the yaml file, build the carbon-apimgt repository to generate code.
Following is the overall coding flow at the REST API level

jaxrs-cxf-cdi : Generates a Java JAXRS Server according to JAXRS 2.0 specification, assuming an Apache CXF runtime and a Java EE runtime with CDI enabled.
JAX-RS : A Java EE specification about creating RESTful APIs in Java Enterprise applications.
Apache CXF : An opensource web services framework which supports multiple types of APIs such as JAX-RS (REST) etc.
Following Java class represents a sample usage of JAX-RS annotations :