Skip to content

Commit

Permalink
Merge pull request #1263 from tdakkota/revert/issue-1246
Browse files Browse the repository at this point in the history
revert: add support for Free-form Objects when a schema definitions only specifies type: object
  • Loading branch information
tdakkota authored Jun 23, 2024
2 parents a74092b + 31300cd commit 42acb09
Show file tree
Hide file tree
Showing 74 changed files with 1,017 additions and 5,269 deletions.
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

0 comments on commit 42acb09

Please sign in to comment.