Documentation
¶
Index ¶
Constants ¶
View Source
const ( OptionalLastParameter = "{%s:.*}" ExtendedLastParameter = "{%s:.+}" )
View Source
const GITHUB_OPENAPI_DEFINITION_LOCATION = "https://github.com/github/rest-api-description/blob/main/descriptions/api.github.com/api.github.com.json?raw=true"
View Source
const GITHUB_OPENAPI_ENTERPRISE_DEFINITION_LOCATION = "https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/ghec/ghec.json"
View Source
const OUTPUT_FILEPATH = "src/mock/endpointpattern.go"
View Source
const OUTPUT_FILE_HEADER = `package mock
// Code generated; DO NOT EDIT.
`
Variables ¶
View Source
var Title = cases.Title(language.English)
Replacing deprecated method strings.Title requires a "Caser"
Functions ¶
func FetchAPIDefinition ¶
func FormatToGolangVarName ¶
func FormatToGolangVarName(sr ScrapeResult) string
FormatToGolangVarName generated the proper golang variable name given a endpoint format from the API
func FormatToGolangVarNameAndValue ¶
func FormatToGolangVarNameAndValue(sr ScrapeResult) string
Types ¶
type ScrapeResult ¶
Click to show internal directories.
Click to hide internal directories.