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

revert: add support for Free-form Objects when a schema definitions only specifies type: object #1263

Merged
merged 4 commits into from
Jun 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions _testdata/positive/free_form.json

This file was deleted.

51 changes: 51 additions & 0 deletions _testdata/positive/issue1255.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
openapi: 3.0.3
info:
title: API
version: 0.1.0
paths:
/test:
get:
operationId: test
responses:
"200":
description: Teste
content:
application/json:
schema:
$ref: "#/components/schemas/HistoryEntry"
components:
schemas:
HistoryEntry:
description: "Properties common for each entry in the scaling history."
type: object
oneOf:
- $ref: "#/components/schemas/HistoryErrorEntry"
- $ref: "#/components/schemas/HistoryIgnoreEntry"
- $ref: "#/components/schemas/HistorySuccessEntry"
properties:
message:
type: string
description: Textual information about the scaling event.
example: app
HistoryErrorEntry:
description: Description of a failed scaling even in history.
type: object
properties:
error:
type: string
description: |
In case the scaling failed, the reason is provided in this field.
example: failed to compute new app instances
HistoryIgnoreEntry:
description: Description of an ignored scaling event in history.
type: object
properties:
ignore_reason:
type: string
description: |
In case the scaling was ignored, the reason is provided in this field.
example: app in cooldown period
HistorySuccessEntry:
description: Description of a successful scaling event event in history.
type: object
properties: {} # No extra fields needed in this variant
12 changes: 6 additions & 6 deletions examples/ex_firecracker/oas_client_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 0 additions & 45 deletions examples/ex_firecracker/oas_faker_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions examples/ex_firecracker/oas_handlers_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading