@@ -181,7 +181,12 @@ pub struct HttpRouteRule {
181
181
///
182
182
/// - Must begin with the `/` character
183
183
/// - Must not contain consecutive `/` characters (e.g. `/foo///`, `//`).
184
- pub type PathMatchType = String ;
184
+ #[ derive( Clone , Debug , PartialEq , serde:: Deserialize , serde:: Serialize , schemars:: JsonSchema ) ]
185
+ pub enum PathMatchType {
186
+ Exact ,
187
+ PathPrefix ,
188
+ RegularExpression ,
189
+ }
185
190
186
191
/// HTTPPathMatch describes how to select a HTTP route by matching the HTTP request path.
187
192
#[ derive( Clone , Debug , PartialEq , serde:: Deserialize , serde:: Serialize , schemars:: JsonSchema ) ]
@@ -202,7 +207,11 @@ pub struct HttpPathMatch {
202
207
///
203
208
/// * "Exact"
204
209
/// * "RegularExpression"
205
- pub type HeaderMatchType = String ;
210
+ #[ derive( Clone , Debug , PartialEq , serde:: Deserialize , serde:: Serialize , schemars:: JsonSchema ) ]
211
+ pub enum HeaderMatchType {
212
+ Exact ,
213
+ RegularExpression ,
214
+ }
206
215
207
216
/// HTTPHeaderName is the name of an HTTP header.
208
217
///
@@ -259,7 +268,11 @@ pub struct HttpHeaderMatch {
259
268
///
260
269
/// * "Exact"
261
270
/// * "RegularExpression"
262
- pub type QueryParamMatchType = String ;
271
+ #[ derive( Clone , Debug , PartialEq , serde:: Deserialize , serde:: Serialize , schemars:: JsonSchema ) ]
272
+ pub enum QueryParamMatchType {
273
+ Exact ,
274
+ RegularExpression ,
275
+ }
263
276
264
277
/// HTTPQueryParamMatch describes how to select a HTTP route by matching HTTP
265
278
/// query parameters.
0 commit comments