shopify2openapi

package module
v0.0.0-...-14efb62 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 10 Imported by: 0

README

shopify2openapi

scraper shopify admin api docs to openapi json

Usage

go run cmd/generate/main.go

Demo

visit Shopify Openapi Redoc

Documentation

Index

Constants

View Source
const (
	REDOC_EXTENSION_TAG_GROUP    = "x-tagGroups"
	REDOC_EXTENSION_CODE_SAMPLES = "x-codeSamples"

	DEFAULT_FILE_NAME = "openapi.json"
)
View Source
const (
	AdminRestAddr = "https://shopify.dev/docs/api"

	VERSION_202401 = "2024-01"
	VERSION_202404 = "2024-04"
)

Variables

This section is empty.

Functions

func GetAdminRestAddr

func GetAdminRestAddr() string

func GetRestfulAPI

func GetRestfulAPI(version string, resource string) string

func ModelName

func ModelName(name string) string

func Scrapper

func Scrapper(version string) error

scrapper admin-rest docs

Types

type ShopifyOpenApiDoc

type ShopifyOpenApiDoc struct {
	openapi3.T
}

func NewShopifyOpenApiDoc

func NewShopifyOpenApiDoc(title, description, version string, extensions map[string]interface{}) ShopifyOpenApiDoc

func (*ShopifyOpenApiDoc) AddShopifyRestApiDoc

func (shopifyDoc *ShopifyOpenApiDoc) AddShopifyRestApiDoc(doc *scraper.ShopifyOpenAPISpec)

func (*ShopifyOpenApiDoc) AppendComponent

func (shopifyDoc *ShopifyOpenApiDoc) AppendComponent(c *scraper.ShopifyOpenapiComponent) error

func (*ShopifyOpenApiDoc) AppendPath

func (shopifyDoc *ShopifyOpenApiDoc) AppendPath(op *openapi3.Operation, tag string) error

func (*ShopifyOpenApiDoc) GenerateModelTag

func (shopifyDoc *ShopifyOpenApiDoc) GenerateModelTag()

add mode tags and x-taggroup from component

func (*ShopifyOpenApiDoc) OutputToJson

func (shopifyDoc *ShopifyOpenApiDoc) OutputToJson(filepath string) error

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL