Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #8
Closed
Open
Issue created May 12, 2018 by Administrator@rootContributor

[DefaultCodegen] Possible missing model for request body for OAS 3.0

Created by: Articus

Description

Consider the following spec:

openapi: 3.0.0
info:
  title: Test
  version: 1.0.0
servers:
  - url: 'http://test/'
components:
  requestBodies:
    TestBodyInline:
      content:
        application/json:
          schema:
            type: object
            properties:
              test:
                type: string
paths:
  /test/ref/inline:
    post:
      summary: Test
      requestBody:
        $ref: '#/components/requestBodies/TestBodyInline'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: string

For this spec CodegenOperation::bodyParam.dataType equals to "object" and no codegen model is generated for request body. A bit lost why this is happenning because 3 other possible scenarios (inline body + inline schema, inline body + ref schema, ref body + ref schema) work perfectly well.

Assignee
Assign to
Time tracking