Class MetadataApi

java.lang.Object
fr.metabocloud.core.apis.MetadataApi
All Implemented Interfaces:
fr.metabocloud.about.openapi.api.AboutApi

@CrossOrigin(origins="*", maxAge=3600L) @RestController public class MetadataApi extends Object implements fr.metabocloud.about.openapi.api.AboutApi
Controller for the "/about" endpoint that provides metadata about the REST API.

The metadata provided includes general information about the API, its version, associated documentation, as well as accessibility and ownership.

  • Field Summary

    Fields inherited from interface fr.metabocloud.about.openapi.api.AboutApi

    PATH_GET_INFORMATION
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.http.ResponseEntity<fr.metabocloud.about.openapi.model.About>
    Handle GET requests to retrieve metadata associated to the REST API.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface fr.metabocloud.about.openapi.api.AboutApi

    getRequest
  • Constructor Details

    • MetadataApi

      public MetadataApi()
  • Method Details

    • getInformation

      public org.springframework.http.ResponseEntity<fr.metabocloud.about.openapi.model.About> getInformation()
      Handle GET requests to retrieve metadata associated to the REST API.

      This method processes HTTP GET requests directed to the "/about" * endpoint. It formats metadata coming from the src/main/resources/info.properties file into JSON and return it.

       {
         "main": {
           "name": "The name of the application",
           "artifact_id" : "The artifact maven id of the application",
           "short_description": "A short description of the project",
           "keywords": [
             "keyword 1",
             "keyword 2",
           ]
         },
         "documentation": {
           "long_description": "A longer, detailed description of the application",
           "doc_swagger": "The path to the Swagger API documentation endpoint",
           "doc_readthedocs": "The path to the ReadTheDocs documentation endpoint"
         },
         "version": {
           "status": "The current development status of the application",
           "version": "The version of the application",
           "short_commit_sha1": "The last Git commit short SHA-1 hash",
           "commit_sha1": "The last Git commit SHA-1 hash",
           "build_timestamp": "A timestamp indicating when the application build occurred (YYYY-MM-DD hh:mm:ss)"
         },
         "ownership_accessibility": {
           "license": "he name of the license under which the application is distributed",
           "authors_microservice_code": "The authors responsible for creating the algorithm or tool used in the application",
           "authors_algorithm_code": "The authors responsible for creating the microservice associated with the application",
           "is_public": "The accessibility level of the application",
           "url_repo_git": "The URL of the Git repository hosting the application's source code",
           "publications_ref": [
             "publication 1",
             "publication 2"
           ]
         }
       }
       
      Specified by:
      getInformation in interface fr.metabocloud.about.openapi.api.AboutApi
      Returns:
      A org.springframework.http.ResponseEntity<fr.metabocloud.about.openapi.model.About> containing the metadata associated to the API.