mirror of
https://github.com/correl/openapi-core.git
synced 2024-11-24 19:19:56 +00:00
14 lines
329 B
Python
14 lines
329 B
Python
|
from parse import Parser
|
||
|
|
||
|
|
||
|
def search(path_pattern, full_url_pattern):
|
||
|
p = Parser(path_pattern)
|
||
|
p._expression = p._expression + '$'
|
||
|
return p.search(full_url_pattern)
|
||
|
|
||
|
|
||
|
def parse(server_url, server_url_pattern):
|
||
|
p = Parser(server_url)
|
||
|
p._expression = '^' + p._expression
|
||
|
return p.parse(server_url_pattern)
|