OpenAPITools / OpenAPITools/openapi-generator
[BUG] Setting v3.1.0 makes object properties AnyType
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
- Have you tested with the latest master to confirm the issue still exists?
- Have you searched for related issues/PRs?
- What's the actual output vs expected output?
- [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
Setting OpenAPI version to 3.1.0 makes types of object properties AnyType.
On version 3.0.0 it works fine.
Diffs between 3.0.0 and 3.1.0: https://github.com/kawaemon/openapi-generator-310-anytype/commit/8dbb3327fe1f826d597bcd58d8c5bbdf5f8fa567
openapi-generator version
latest
OpenAPI declaration file content or url
openapi: 3.1.0
info:
title: API
version: 0.1.0
paths:
'/foo':
get:
responses:
'200':
description: ok
content:
application/json:
schema:
type: object
properties:
foo:
type: string
Generation Details
Please look at this repo:
https://github.com/kawaemon/openapi-generator-310-anytype
Steps to reproduce
openapi-generator-cli generate -g go-server -i schema.yaml -o output
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the provided schema.yaml and run the openapi-generator-cli command for the go-server generator. Compare the generated object property types under OpenAPI 3.1.0 with the 3.0.0 result and the linked reproduction repository; done means string properties are no longer generated as AnyType.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, openapi
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100