mirror of
https://github.com/correl/openapi-core.git
synced 2024-11-25 11:09:53 +00:00
17 lines
436 B
Python
17 lines
436 B
Python
class Info(object):
|
|
|
|
def __init__(self, title, version):
|
|
self.title = title
|
|
self.version = version
|
|
|
|
|
|
class InfoFactory(object):
|
|
|
|
def __init__(self, dereferencer):
|
|
self.dereferencer = dereferencer
|
|
|
|
def create(self, info_spec):
|
|
info_deref = self.dereferencer.dereference(info_spec)
|
|
title = info_deref['title']
|
|
version = info_deref['version']
|
|
return Info(title, version)
|