Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swagger html plugin generates some properties wrongly #12510

Open
jadur10 opened this issue Jan 3, 2025 · 0 comments
Open

Swagger html plugin generates some properties wrongly #12510

jadur10 opened this issue Jan 3, 2025 · 0 comments

Comments

@jadur10
Copy link

jadur10 commented Jan 3, 2025

Description

I have a problem with swagger html page that is generated after codegen processes.
In the Example Value window I have both uturn and u_turn properties generated

"way_tags": {
      "uturn": true,
      "highway": "residential",
      "name": "Charles-de-Gaulle-Str",
      "oneway": "yes",
      "connector": true,
      "car": true,
      "carrier": true,
      "walk": true,
      "car_speed": 30,
      "parking": true,
      "u_turn": true,
      "busy": false,
      "zigzag": true,
      "pref_dir": "0",
      "pref_loop": "0",
      "width": 0,
      "bike_orientation": true
    },

while in the yaml definition only "u_turn" is defined

Swagger-codegen version

3.0.66

Swagger declaration file content or url
    way_tags:
      type: object
      description: |
        Way tags are key-value-pairs that describe the properties of the (physical) street segment that a way represents; the tags that are most relevant DPDHL internally are defined below. 

        Note:
        - The tags are not necessarily provided in the order defined below.
        - Use the "fields" parameter to restrict the list of way tags that the service returns. See '#/components/schemas/fields-parameter'
      properties:
        highway:
          type: string
          enum:
            - motorway
            - motorway_link
            - trunk
            - trunk_link
            - primary
            - primary_link
            - secondary
            - secondary_link
            - tertiary
            - tertiary_link
            - unclassified
            - residential
            - service
            - pedestrian
            - living_street
            - cycleway
            - footway
            - path
            - track
            - steps
            - construction
          example: residential

          description: |
            Defines the type of a street segment
            
            Note:
            - Although, in OSM, there are more highway types, the get /street-network service will return only street segments with one of the values in the above list.

        name:
          type: string
          description: |
            name of the street segment, as given in OSM

            Note:
            - The OSM name of a street segment does not necessarily match the POINT requirements for a  street name; the spelling might be different
          example: Charles-de-Gaulle-Str

        oneway:
          type: string
          description: |
            defines if a street segment is marked as oneway street or not

            Sample values: 
            - yes = oneway street (in diggitalization direction, from start to end)
            - no = not a oneway street
            - -1 = exceptional case, indicates that a street segment is one way not in digitalization direction, but the reverse direction; used rarely
          example: 'yes'

        'connector':
          type: boolean
          description: |
            DPDHL internal tag
            defines whether it is allowed to connect a postal object (e.g. a delivery point) to a street segment

            Possible values:
            - true
            - false
          example: true

        'car':
          type: boolean
          description: |
            DPDHL internal tag; 
            marks a street segment as being accessible by car

            Possible values:
            - true
            - false
          example: true

        'carrier':
          type: boolean
          description: |
            DPDHL internal tag;
            marks a street segment as being accessible with a carrier

            Possible values:
            - true
            - false
          example: true

        'walk':
          type: boolean
          description: |
            DPDHL internal tag;
            marks a street segment as being accessible for pedestrians

            Possible values:
            - true
            - false
          example: true

        'car_speed':
          type: integer
          format: int8
          minimum: 0
          maximum: 999
          description: |
            DHL internal tag;
            defines speed limit (in km/h) for a street segment
          example: 30

        'parking':
          type: boolean
          description: |
            DPDHL internal tag;
            defines whether parking is allowed on the street segment

            Possible values:
            - true
            - false
          example: true

        'u_turn':
          type: boolean
          description: |
            DPDHL internal tag; 
            defines whether a u-turn is allowed on the street segment

            Possible values:
            - true
            - false
          example: true

        'busy':
          type: boolean
          description: |
            DPDHL internal tag; 
            defines whether there is much traffic on a street segment or not;
            on street segments with a lot of traffic (that is: busy), it is usually more difficult to cross the street segment as a pedestrian

            Possible values:
            - true
            - false
          example: false

        'zigzag':
          type: boolean
          description: |
            DPDHL internal tag; 
            defines whether delivery on a street segment can be done alternating between both street sides (zigzag = true), or whether the delivery should be done one street side after the other (zigzag = false)

            Possible values:
            - true
            - false
          example: true

        'pref_dir':
          type: string
          description: |
            DPDHL internal tag; 
            defines whether delivery on a street segment should be done in a specific order

            Possible values:
            - -1 = contrary to the direction of digitization 
            - 0 = no preference 
            - 1 = in the direction of digitization
          example: 0

        'pref_loop':
          type: string
          description: |
            DPDHL internal tag

            Possible values:
              2
              1
              0 
             -1
             -2

          example: 0

        'width':
          type: number
          format: double
          description: | 
            DPDHL internal tag
            possible values: 0 to 30
          example: 0
          minimum: 0
          maximum: 30

        'bike_orientation':
          type: boolean
          description: DPDHL internal tag
          example: true

      required:
        - highway
Command line used for generation

Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
Java version: 17.0.10, vendor: Eclipse Adoptium

Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant