paths

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: MIT Imports: 9 Imported by: 6

Documentation

Overview

Package paths contains all the logic, models and interfaces for validating OpenAPI 3+ Paths.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindPath

func FindPath(request *http.Request, document *v3.Document) (*v3.PathItem, []*errors.ValidationError, string)

FindPath will find the path in the document that matches the request path. If a successful match was found, then the first return value will be a pointer to the PathItem. The second return value will contain any validation errors that were picked up when locating the path. The third return value will be the path that was found in the document, as it pertains to the contract, so all path parameters will not have been replaced with their values from the request - allowing model lookups.

func StripRequestPath added in v0.0.45

func StripRequestPath(request *http.Request, document *v3.Document) string

StripRequestPath strips the base path from the request path, based on the server paths provided in the specification

Types

This section is empty.

Jump to

Keyboard shortcuts

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