Open APIs

 View Only
  • 1.  openapicodegen fails to generate valid models for v5 specification for spring

    TM Forum Member
    Posted 26 days ago

    Hi All

    Did anyone face a problem in generating the server side skeleton for spring-boot language (V2 or v3) for the latest v5 OpenAPI specification ?

    To be more specific, the problem is around the @type discriminator for PlaceFVO which inturn impacts wherever we use GeographicXXXX definitions. 

    We are using org.openapitools.openapi-generator-maven-plugin plugin to generate server side code for spring language. 

    Issues observed

    getAtType() in com.example.model.GeographicLocationMVO cannot implement getAtType() in com.example.model.GeographicLocationRefOrValueMVO
    getAtType() in com.example.model.GeographicLocationFVO cannot implement getAtType() in com.example.model.GeographicLocationRefOrValueFVO

    Tried providing typeMapping in the build configuration, but still facing this problem.

    Thanks,
    Raghavan



    ------------------------------
    Raghavan TV
    Tata Consultancy Services
    ------------------------------


  • 2.  RE: openapicodegen fails to generate valid models for v5 specification for spring

    TM Forum Member
    Posted 26 days ago
    Edited by Raghavan TV 26 days ago

    Ok. Found the root cause for this issue. 

    The problem was with TMF622-ProductOrdering-v5.0.0.oas.yaml with the GeographicAddress schemas

    This has been corrected in the latest TMF673-GeographicAddress-v5.0.0.oas schemas. So manually synced the GeoXXXX schemas inside ProductOrdering based on TMF673-GeographicAddress-v5.0.0.oas definitions and then the codegen works fine.

    I'll open a Jira ticket for the same.

     



    ------------------------------
    Raghavan TV
    Tata Consultancy Services
    ------------------------------