Skip to content

Commit e8b5518

Browse files
Merge pull request #630 from plantbreeding/brapi-V2.1
Merge in v2.1
2 parents 75291cb + bd60786 commit e8b5518

File tree

57 files changed

+524
-157
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+524
-157
lines changed

Scripts/buildBlueprint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def go():
3232
headerHTML = ''
3333
with open(headerPath, "r") as headerFile:
3434
try:
35-
fileObj = yaml.load(headerFile)
35+
fileObj = yaml.safe_load(headerFile)
3636
if 'info' in fileObj:
3737
if 'description' in fileObj['info']:
3838
headerHTML = parseHTMLToMD(fileObj['info']['description'])

Scripts/buildGlossaryFromOpenAPI.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def main():
164164
with open(rootPath + 'brapi_openapi.yaml', "r") as stream:
165165
try:
166166
global fullBrAPI
167-
fullBrAPI = yaml.load(stream)
167+
fullBrAPI = yaml.safe_load(stream)
168168
stream.close()
169169
except yaml.YAMLError as exc:
170170
stream.close()

Scripts/buildOpenAPI.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def go(rootPaths, metaFilePath = './swaggerMetaData.yaml'):
3333
for filename in filenames:
3434
with open(filename, "r") as stream:
3535
try:
36-
fileObj = yaml.load(stream, Loader=Loader)
36+
fileObj = yaml.safe_load(stream)
3737
if 'paths' in fileObj:
3838
paths.update(fileObj['paths'])
3939
if 'components' in fileObj:
@@ -56,7 +56,7 @@ def go(rootPaths, metaFilePath = './swaggerMetaData.yaml'):
5656
out = {}
5757
with open(metaFilePath, "r") as metaFile:
5858
try:
59-
out = yaml.load(metaFile, Loader=Loader)
59+
out = yaml.safe_load(metaFile)
6060
except yaml.YAMLError as exc:
6161
print(exc)
6262

Scripts/buildReadMes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def buildReadMe(dir, fullBrAPI):
254254
fileObj = {}
255255
with open(filename, "r") as stream:
256256
try:
257-
fileObj = yaml.load(stream)
257+
fileObj = yaml.safe_load(stream)
258258
stream.close()
259259
except yaml.YAMLError as exc:
260260
print(exc)

Scripts/buildTermBrowserReference.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
def buildTermBrowserData(specPath):
1010
with open(specPath + '/brapi_openapi.yaml', "r") as stream:
1111
try:
12-
fullBrAPI = yaml.load(stream)
12+
fullBrAPI = yaml.safe_load(stream)
1313
stream.close()
1414
except yaml.YAMLError as exc:
1515
stream.close()

Scripts/buildWikiFiles.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def getObject(filename):
1212
fileObj = {}
1313
with open(filename, "r") as stream:
1414
try:
15-
fileObj = yaml.load(stream)
15+
fileObj = yaml.safe_load(stream)
1616
stream.close()
1717
except yaml.YAMLError as exc:
1818
print(exc)

Scripts/dereferenceAll.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def dereferenceBrAPI(filePath = './brapi_openapi.yaml', verbose = False):
105105
print(filePath)
106106
with open(filePath, "r") as stream:
107107
try:
108-
fileObj = yaml.load(stream)
108+
fileObj = yaml.safe_load(stream)
109109
stream.close()
110110
except yaml.YAMLError as exc:
111111
stream.close()

Scripts/generateExamples.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def readFileToDict(path):
8383
fileObj = {}
8484
with open(path, "r") as stream:
8585
try:
86-
fileObj = yaml.load(stream)
86+
fileObj = yaml.safe_load(stream)
8787
stream.close()
8888
except yaml.YAMLError as exc:
8989
print(exc)

Specification/BrAPI-Core/Lists/Schemas/ListDetails.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ components:
1313
x-brapi-metadata:
1414
primaryModel: true
1515
module: BrAPI-Core
16-
title: List
17-
description: A List represents a collection of other BrAPI data objects. Typically these are custom lists generated by a user to keep track of interesting data. For example, a user might build a List of Germplasm that they have manually marked for further study.
16+
title: List
17+
description: A List represents a collection of other BrAPI data objects. Typically these are custom lists generated by a user to keep track of interesting data. For example, a user might build a List of Germplasm that they have manually marked for further study.
1818
properties: {}

Specification/BrAPI-Core/Locations/Schemas/Location.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ components:
1212
x-brapi-metadata:
1313
primaryModel: true
1414
module: BrAPI-Core
15-
title: Location
16-
description: A geographic Location on earth. This is usually used to describe the general area where an experiment took place. For example, a natural site, an experimental field, a greenhouse, a phenotyping facility, etc.
15+
title: Location
16+
description: A geographic Location on earth. This is usually used to describe the general area where an experiment took place. For example, a natural site, an experimental field, a greenhouse, a phenotyping facility, etc.
1717
properties:
1818
locationDbId:
1919
description: The unique identifier for a Location

0 commit comments

Comments
 (0)