Skip to content
This repository was archived by the owner on Feb 12, 2022. It is now read-only.
This repository was archived by the owner on Feb 12, 2022. It is now read-only.

RAML to Java - Result objects do not compile due missing override of methods #417

Open
@JuanCBasso

Description

@JuanCBasso

Hi, I'm using raml-to-jaxrs-maven-plugin version 3.0.7 , and the result objects do not compile , the issue I is when having inheritance of types in the RAML definition.
When having some types like :

baseEndpointConfig:
    type: object
    displayName: Base Endpoint Config object
    discriminator: configName
    properties:
      configName: string
      serverAddress:
        type: string
        displayName: Server Address
        required: false
        description: Defines Server/Host Address
      serverPort:
        type: integer
        displayName: Server Port
        required: false
      authMode:
        type: AuthModeBaseConfig
        required: false
        default: { 'authType': 'NONE'}
    additionalProperties: true

  BaseEndpoint:
    type: object
    displayName: Base Endpoint
    discriminator: endpointType
    properties:
      id :
        type: string
        required: false
      name: string
      endpointType:
        type: string
        required: false
      config:
        type: baseEndpointConfig
        properties:

  httpConfig:
    type: baseEndpointConfig
    discriminatorValue: http
    properties:
      protocol:
        enum: [ 'HTTP', 'HTTPS' ]
        default: 'HTTP'
      serverAddress: string
      serverPort:
        type: integer
        default: 80
      path: string
      allowedMethods:
        enum: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS']
        default: 'POST'
      authMode:
        type: AuthModeBaseConfig

  http:
    type: BaseEndpoint
    displayName: HTTP Endpoint
    discriminatorValue: HTTP
    properties:
      config: httpConfig

  as9Config:
    type: baseEndpointConfig
    discriminatorValue: AS9
    properties:
      protocol:
        enum: [ 'HTTP', 'HTTPS' ]
        default: 'HTTP'
      httpEndpointUrl?:
        type: string

  as9:
    type: BaseEndpoint
    displayName: AS9 Endpoint
    discriminatorValue: AS2
    properties:
      config: as9Config

I got this error in my generated classes:

HttpImpl.java:[8,8] api.model.HttpImpl is not abstract and does not override abstract method setConfig(api.model.BaseEndpointConfig) in api.model.BaseEndpoint

This is an example of the API I'm trying to use with the plugin :
api.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions