-- in.cue --
import "struct"

#MyMap: struct.MinFields(4)
#MyMap: struct.MaxFields(9)

#MyType: {
	map: #MyMap
}

-- out/TestGenerateOpenAPI/out.json --
{
   "openapi": "3.0.0",
   "info": {
      "title": "Generated by cue.",
      "version": "no version"
   },
   "paths": {},
   "components": {
      "schemas": {
         "MyMap": {
            "type": "object",
            "minProperties": 4,
            "maxProperties": 9
         },
         "MyType": {
            "type": "object",
            "required": [
               "map"
            ],
            "properties": {
               "map": {
                  "$ref": "#/components/schemas/MyMap"
               }
            }
         }
      }
   }
}