-- in.cue --
package ext

import "mod.test/blocks"

#Blocks: {
	block1: blocks.#Block
}

-- out/TestGenerateOpenAPI/out.json --
{
   "openapi": "3.0.0",
   "info": {
      "title": "Generated by cue.",
      "version": "no version"
   },
   "paths": {},
   "components": {
      "schemas": {
         "Block": {
            "type": "object",
            "required": [
               "a",
               "b"
            ],
            "properties": {
               "a": {
                  "type": "number",
                  "minimum": 50,
                  "exclusiveMinimum": true
               },
               "b": {
                  "type": "number",
                  "maximum": 10,
                  "exclusiveMaximum": true
               }
            }
         },
         "Blocks": {
            "type": "object",
            "required": [
               "block1"
            ],
            "properties": {
               "block1": {
                  "$ref": "#/components/schemas/Block"
               }
            }
         }
      }
   }
}
