Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 2.9 KB

API documentation.md

File metadata and controls

56 lines (40 loc) · 2.9 KB

API Documentation

The documentation of Application Programming Interface of Order Manager is accessible at:

Setup

Setup for generating API documentation for Product module is illustrated below. Similar steps for Order and Inventory modules offer consistent results.

  • Add the following dependencies in pom-xml (or in respective format in build.gradle.kts/build.gradle): Dependencies for API Doc

  • In application.properties under src/main/resources, add the following two resources (kea-value pairs):

springdoc.swagger-ui.path=/doc/webui
springdoc.api-docs.path=/doc/json

The first pair above is to view the API documentation in HTML format (web-based GUI). And, the second one is to access the API doc in JSON format; this response of this service endpoint is so versatile that it can be fed for consumption into any REST client as well as read easily by humans.

  • Lastly, create this configuration file (Java class or equivalent in another JVM language) in classpath- OpenApiSpecsConfig: Configuration class for Doc

  • Then add the code (Java code has been added, feel free to switch to Kotlin if you prefer!).

Manual Testing and Operation, along with Keycloak Configuration

  • Now sit back tight and do the dirty engineering on service endpoints, integration and parameter matching.

  • Run docker-compose up -d out of Product, Order and Inventory services.

  • Start (Run.../Debug...) Product, Order, Inventory and Gateway services with IDE or CLI.

  • Hit Product service over the port of Gateway. You succeed to access the service endpoint: via-gateway-products

Contact Pointers

Credits and Gratitude

I thank all who have mentored, taught and guided me. Also, I appreciate who have supported my work with pair programming and more.