Open ericzhang6222 opened 4 years ago
Please do not post any internal, closed source snippets on this public issue tracker!
Export openapi3 file from Sysl file
sysl export --format="openapi3" --output="%(appname).yaml" simple-openapi3.sysl
simple-openapi3.sysl
SimpleOpenAPI3 "SimpleOpenAPI3": @description =: | Simple demo for openapi file export /test: GET: | Endpoint for testing GET return error return ok <: SimpleObj #--------------------------------------------------------------------------- # definitions !type SimpleObj: name <: string?: @json_tag = "name" !type SimpleObj2: name <: SimpleObj?: @json_tag = "name"
SimpleOpenAPI3.yaml
components: schemas: SimpleObj: properties: name: type: string type: object SimpleObj2: properties: name: $ref: '#/components/schemas/SimpleObj' type: object info: contact: {} description: | Simple demo for openapi file export title: SimpleOpenAPI3 version: "" openapi: 3.0.0 paths: /test: get: description: Endpoint for testing GET responses: "200": content: application/json: {} description: "200" servers: - url: ""
Expected behavior:
info: contact: {} description: Simple demo for openapi file export title: SimpleOpenAPI3 version: ""
Actual behavior:
info: contact: {} description: | Simple demo for openapi file export title: SimpleOpenAPI3 version: ""
$ sysl info Build: Version : v0.136.0 Git Commit : 9d1dc564c36b273b09cbc68b7a1c4c1c42ea991e Date : 2020-07-06T06:56:22Z Go Version : go1.13.12 linux/amd64 OS : darwin/amd64
$ sysl env SYSL_MODULES="" SYSL_PLANTUML="http://localhost:8080"
Please do not post any internal, closed source snippets on this public issue tracker!
Description
Export openapi3 file from Sysl file
simple-openapi3.sysl
SimpleOpenAPI3.yaml
Expected behavior:
Actual behavior:
Your Environments