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

Possible values section are not displaying correctly #747

Closed
TBurda opened this issue Mar 16, 2024 · 1 comment
Closed

Possible values section are not displaying correctly #747

TBurda opened this issue Mar 16, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@TBurda
Copy link

TBurda commented Mar 16, 2024

Describe the bug

"Possible values" section are not displaying correctly. In the YAML specification for the API, enumerations ActivityType and ActivityTypeTimeEntry are defined to be listed as possible values, but it seems they are not being displayed correctly. In version 1.7.2 it works correctly!

Snímek obrazovky 2024-03-16 v 9 08 56

x-generator: NSwag v13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))
openapi: 3.0.0
info:
  title: Logeto public API
  version: 2.0.0
servers:
  - url: https://{AccountName}.logeto.com
    variables:
      AccountName:
        default: '[AccountName]'
paths:
  /api/v2/Activities:
    get:
      tags:
        - Activities
      summary: Get list of activities
      operationId: Activities_Get
      parameters:
        - name: ContinuationToken
          in: query
          description: Token is needed, unless all records have been returned in previous request. Do not forget to pass also all other parameters.
          schema:
            type: string
            nullable: true
          x-position: 1
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActivitiesResponse'
        '400':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ActivitiesResponse:
      allOf:
        - $ref: '#/components/schemas/ResponseBase'
        - type: object
          additionalProperties: false
          properties:
            Items:
              type: array
              nullable: true
              items:
                $ref: '#/components/schemas/ActivitiesResponseItem'
    ActivitiesResponseItem:
      allOf:
        - $ref: '#/components/schemas/SystemFieldsResponse'
        - type: object
          additionalProperties: false
          required:
            - Name
          properties:
            Name:
              type: string
              nullable: true
            Code:
              type: string
              nullable: true
            Type:
              default: Work
              oneOf:
                - $ref: '#/components/schemas/ActivityType'
            Default:
              type: boolean
            TimeEntry:
              default: Optional
              oneOf:
                - $ref: '#/components/schemas/ActivityTypeTimeEntry'
            Inactive:
              type: boolean
            Movement:
              type: boolean
            Icon:
              type: string
              nullable: true
            ExternalKey:
              type: string
              nullable: true
    ActivityType:
      type: string
      description: ''
      x-enumNames:
        - Work
        - Absence
        - Break
      enum:
        - Work
        - Absence
        - Break
    ActivityTypeTimeEntry:
      type: string
      description: ''
      x-enumNames:
        - Optional
        - TotalTime
        - FromTo
      enum:
        - Optional
        - TotalTime
        - FromTo
    SystemFieldsResponse:
      allOf:
        - $ref: '#/components/schemas/SystemFieldsResponseBase'
        - type: object
          additionalProperties: false
          properties:
            Guid:
              type: string
              format: guid
            Revision:
              type: integer
              format: int64
            PersonCreated:
              type: string
              format: guid
              nullable: true
            PersonChanged:
              type: string
              format: guid
              nullable: true
            TimestampCreated:
              type: string
              format: date-time
              nullable: true
              example: '2024-01-28T13:59:00Z'
            TimestampChanged:
              type: string
              format: date-time
              nullable: true
              example: '2024-01-28T13:59:00Z'
    SystemFieldsResponseBase:
      type: object
      x-abstract: true
      additionalProperties: false
    ResponseBase:
      type: object
      additionalProperties: false
      properties:
        ContinuationToken:
          type: string
          nullable: true
    ErrorResponse:
      type: object
      additionalProperties: false
      required:
        - Error
      properties:
        Error:
          $ref: '#/components/schemas/ErrorBase'
    ErrorBase:
      type: object
      additionalProperties: false
      properties:
        Code:
          type: string
          nullable: true
        Message:
          type: string
          nullable: true
  securitySchemes:
    AccessKey:
      type: apiKey
      name: AccessKey
      in: header
security:
  - AccessKey: []

v1.7.2

Snímek obrazovky 2024-03-16 v 9 13 22

Your Environment

  • Version used: v2.0.4 (Docusaurus version 2.4.3)
@TBurda
Copy link
Author

TBurda commented Mar 22, 2024

Confirmed fixed in v2.1.2.

Thank you for the fix.

@TBurda TBurda closed this as completed Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant