paths

package
v0.107.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: MIT, MIT Imports: 9 Imported by: 0

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. Number/Integer validation is performed in any path parameters in the request. 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

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