# GatewayPathMatchType

- Kind: `enum`
- Package: [Aspire.Hosting.Kubernetes](/reference/api/csharp/aspire.hosting.kubernetes.md)
- Version: `13.4.0-preview.1.26281.18`
- Namespace: `Aspire.Hosting.Kubernetes`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/src/Aspire.Hosting.Kubernetes/Annotations/GatewayPathMatchType.cs)

Specifies the type of path matching used in a Kubernetes Gateway API `HTTPRoute` rule. The values map directly to the `matches[].path.type` field defined by the Gateway API (see [https://gateway-api.sigs.k8s.io/api-types/httproute/#path](https://gateway-api.sigs.k8s.io/api-types/httproute/#path)) and are distinct from the Ingress-flavoured [IngressPathType](/reference/api/csharp/aspire.hosting.kubernetes/ingresspathtype.md) because the two specs use different vocabularies (Ingress: `Prefix`, Gateway: `PathPrefix`).

## Definition

```csharp
namespace Aspire.Hosting.Kubernetes;

public enum GatewayPathMatchType
```

## Enum Members

| Name | Value | Description |
| --- | --- | --- |
| PathPrefix | 0 | Matches based on a URL path prefix split by /. Equivalent to the Gateway API PathPrefix match type. |
| Exact | 1 | Matches the URL path exactly and with case sensitivity. |
| RegularExpression | 2 | Matches the URL path against an implementation-defined regular expression. Support is optional in the Gateway API spec; check your controller's documentation before using it. |
