-
Notifications
You must be signed in to change notification settings - Fork 302
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
encoding/openapi: full support for OpenAPI #3133
Labels
Comments
cueckoo
pushed a commit
to cue-lang/cuelang.org
that referenced
this issue
May 8, 2024
This adds a concept guide demonstrating how CUE works with OpenAPI. Much of the comparative discussion from https://cuelang.org/docs/concept/schema-definition-use-case/#json-schema--openapi is omitted, keeping the document focused on the pragmatic and possible. cue-lang/cue#3133 was opened as part of this change, which asks the project to support full round-tripping from OpenAPI to CUE and back again; or to decide and document which OpenAPI elements aren't supported. For cue-lang/docs-and-content#72 Preview-Path: /docs/concept/how-cue-works-with-openapi/ Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com> Change-Id: I9f9968d381d516f0e189616871919ddb063f11d3
cueckoo
pushed a commit
to cue-lang/cuelang.org-trybot
that referenced
this issue
May 8, 2024
This adds a concept guide demonstrating how CUE works with OpenAPI. Much of the comparative discussion from https://cuelang.org/docs/concept/schema-definition-use-case/#json-schema--openapi is omitted, keeping the document focused on the pragmatic and possible. cue-lang/cue#3133 was opened as part of this change, which asks the project to support full round-tripping from OpenAPI to CUE and back again; or to decide and document which OpenAPI elements aren't supported. For cue-lang/docs-and-content#72 Preview-Path: /docs/concept/how-cue-works-with-openapi/ Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com> Change-Id: I9f9968d381d516f0e189616871919ddb063f11d3 Dispatch-Trailer: {"type":"trybot","CL":1192024,"patchset":6,"ref":"refs/changes/24/1192024/6","targetBranch":"master"}
cueckoo
pushed a commit
to cue-lang/cuelang.org
that referenced
this issue
May 9, 2024
This adds a concept guide demonstrating how CUE works with OpenAPI. Much of the comparative discussion from https://cuelang.org/docs/concept/schema-definition-use-case/#json-schema--openapi is omitted, keeping the document focused on the pragmatic and possible. cue-lang/cue#3133 was opened as part of this change, which asks the project to support full round-tripping from OpenAPI to CUE and back again; or to decide and document which OpenAPI elements aren't supported. For cue-lang/docs-and-content#72 Preview-Path: /docs/concept/how-cue-works-with-openapi/ Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com> Change-Id: I9f9968d381d516f0e189616871919ddb063f11d3
cueckoo
pushed a commit
to cue-lang/cuelang.org-trybot
that referenced
this issue
May 9, 2024
This adds a concept guide demonstrating how CUE works with OpenAPI. Much of the comparative discussion from https://cuelang.org/docs/concept/schema-definition-use-case/#json-schema--openapi is omitted, keeping the document focused on the pragmatic and possible. cue-lang/cue#3133 was opened as part of this change, which asks the project to support full round-tripping from OpenAPI to CUE and back again; or to decide and document which OpenAPI elements aren't supported. For cue-lang/docs-and-content#72 Preview-Path: /docs/concept/how-cue-works-with-openapi/ Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com> Change-Id: I9f9968d381d516f0e189616871919ddb063f11d3 Dispatch-Trailer: {"type":"trybot","CL":1192024,"patchset":7,"ref":"refs/changes/24/1192024/7","targetBranch":"master"}
cueckoo
pushed a commit
to cue-lang/cuelang.org
that referenced
this issue
May 9, 2024
This adds a concept guide demonstrating how CUE works with OpenAPI. Much of the comparative discussion from https://cuelang.org/docs/concept/schema-definition-use-case/#json-schema--openapi is omitted, keeping the document focused on the pragmatic and possible. cue-lang/cue#3133 was opened as part of this change, which asks the project to support full round-tripping from OpenAPI to CUE and back again; or to decide and document which OpenAPI elements aren't supported. For cue-lang/docs-and-content#72 Preview-Path: /docs/concept/how-cue-works-with-openapi/ Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com> Change-Id: I9f9968d381d516f0e189616871919ddb063f11d3 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1192024 Reviewed-by: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Paul Jolly <paul@myitcv.io>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
Users with existing OpenAPI documents can use the OpenAPI support initially tracked in #56 to work with their documents using the
cue
command, and the Go API.However, as issues such as #1501 and #386 point out, users can't currently take an arbitrary OpenAPI document,
cue import
it, and thencue export
their way back to the original document. Various fixed fields mentioned at https://swagger.io/specification/#fixed-fields (such aspaths
,externalDocs
, and several keys undercomponents
) are currently ignored when CUE imports an OpenAPI document.Describe the solution you'd like
I'd like CUE to implement full round-trip-ability from OpenAPI to CUE and back again; or to document those OpenAPI features/fields/elements for which round-tripping is unlikely to be achieved, so that OpenAPI users can make judgements about the degree of support that they require, based on their specific, individual OpenAPI use.
(Note that this doesn't ask for full round-trip-ability from arbitrary CUE to OpenAPI and back again)
Describe alternatives you've considered
n/a.
Additional context
This is being opened as part of the documentation work being performed in https://cuelang.org/cl/1192024.
The text was updated successfully, but these errors were encountered: