Skip to content

Commit

Permalink
[core] Fix 'load_spec'
Browse files Browse the repository at this point in the history
Signed-off-by: weiyang <[email protected]>
  • Loading branch information
wy-z committed May 29, 2019
1 parent 54f49a8 commit b984291
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions oai_request/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
import pprint
import typing

import yaml

import requests
import yaml

from .requestor import Requestor

Expand Down Expand Up @@ -175,7 +174,7 @@ def load_spec(self, spec: typing.Dict):
[i in spec for i in [OAIKeyWord.OPENAPI, OAIKeyWord.INFO, OAIKeyWord.PATHS]]
):
raise ValueError("Invaliad openapi document")
self._spec = spec
self._spec = spec.copy()

servers = spec.pop(OAIKeyWord.SERVERS, [])
for key in spec:
Expand Down

0 comments on commit b984291

Please sign in to comment.