{"modulePath":"github.com/s04/openapi2cli","version":"v0.0.0-20260921201255-7561d1624755","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package parser\n\n## Types\n\n```go\ntype APISpec struct {\n\tTitle        string\n\tDescription  string\n\tVersion      string\n\tServers      []Server\n\tResources    []Resource\n\tSecurityDefs []SecurityDef\n}\n```\nAPISpec is the unified internal model for both OpenAPI 3.x and Swagger 2.0 specs.\n\n```go\nfunc Parse(specBytes []byte) (*APISpec, error)\n```\nParse reads raw spec bytes and returns a unified APISpec.\n\n```go\ntype Operation struct {\n\tID          string\n\tSummary     string\n\tDescription string\n\tMethod      string\n\tPath        string\n\tParameters  []Parameter\n\tRequestBody *RequestBody\n\tSecurity    []SecurityRequirement\n}\n```\n\n```go\ntype Parameter struct {\n\tName        string\n\tIn          string // path, query, header, cookie\n\tDescription string\n\tRequired    bool\n\tType        string // string, integer, boolean, number, array\n\tDefault     any\n\tEnum        []string\n}\n```\n\n```go\ntype Property struct {\n\tName        string\n\tType        string\n\tDescription string\n\tRequired    bool\n\tDefault     any\n\tEnum        []string\n}\n```\n\n```go\ntype RequestBody struct {\n\tDescription string\n\tRequired    bool\n\tContentType string\n\tProperties  []Property\n}\n```\n\n```go\ntype Resource struct {\n\tName        string\n\tDescription string\n\tOperations  []Operation\n}\n```\n\n```go\ntype SecurityDef struct {\n\tName      string\n\tType      string // apiKey, http\n\tIn        string // header, query\n\tParamName string\n\tScheme    string // bearer, basic\n}\n```\n\n```go\ntype SecurityRequirement struct {\n\tSchemeName string\n\tScopes     []string\n}\n```\n\n```go\ntype Server struct {\n\tURL         string\n\tDescription string\n}\n```\n\n","path":"github.com/s04/openapi2cli/internal/parser","name":"parser","synopsis":"","isRedistributable":true}
