File: embed.go

package info (click to toggle)
golang-github-go-openapi-spec 1%3A0.21.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,748 kB
  • sloc: makefile: 5
file content (17 lines) | stat: -rw-r--r-- 348 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package spec

import (
	"embed"
	"path"
)

//go:embed schemas/*.json schemas/*/*.json
var assets embed.FS

func jsonschemaDraft04JSONBytes() ([]byte, error) {
	return assets.ReadFile(path.Join("schemas", "jsonschema-draft-04.json"))
}

func v2SchemaJSONBytes() ([]byte, error) {
	return assets.ReadFile(path.Join("schemas", "v2", "schema.json"))
}