@@ -201,7 +201,7 @@ def validate_json(self, stac_content, stac_schema):
201201 :param stac_schema of STAC (item, catalog, collection)
202202 :return: validation message
203203 """
204- print (json .dumps (stac_content , indent = 4 ))
204+ # print(json.dumps(stac_content, indent=4))
205205
206206 #valid - python3 stac_validator.py https://raw.githubusercontent.com/radiantearth/stac-spec/master/item-spec/examples/sample-full.json --extension eo --version 1.0.0-beta.2
207207 #invalid - python3 stac_validator.py https://raw.githubusercontent.com/radiantearth/stac-spec/master/item-spec/examples/sample-full.json --extension eo --version 0.9.0
@@ -222,16 +222,18 @@ def validate_json(self, stac_content, stac_schema):
222222 # if self.extension not in extension_list:
223223 # raise ExtensionException
224224 if self .extension in extension_list :
225- print (self .extension )
225+ pass
226+ #print(self.extension)
226227
227- print (self .extension )
228+ # print(self.extension)
228229 # print(self.stac_version)
229- if (self .extension ):
230- # message["extension_flag"] = self.extension
230+ if (self .extension != 'None' ):
231+ print ("here" )
232+ message ["extension_flag" ] = self .extension
231233 stacschema = pystac .validation .JsonSchemaSTACValidator ()
232234 self .stac_type = self .get_stac_type (stac_content )
233- print (self .stac_type )
234- print ("here" )
235+ # print(self.stac_type)
236+ # print("here")
235237 self .stac_type = self .stac_type .upper ()
236238 # self.stac_version = '1.0.0-beta.2'
237239 stacschema .validate_extension (stac_dict = stac_content , stac_object_type = self .stac_type , stac_version = self .stac_version , extension_id = self .extension )
0 commit comments