@@ -428,8 +428,8 @@ def generate(self) -> Dict[str, Any]:
428
428
def get (self ) -> Dict [str , str ]:
429
429
"""Create the EntryPoint object to be returnd for the get function."""
430
430
object_ = {
431
- "@context" : "/{} /contexts/EntryPoint.jsonld" .format (self .api ),
432
- "@id" : "/{} " .format (self .api ),
431
+ "@context" : "{}{} /contexts/EntryPoint.jsonld" .format (self . url , self .api ),
432
+ "@id" : "{}{} " .format (self . url , self .api ),
433
433
"@type" : "EntryPoint" ,
434
434
435
435
}
@@ -438,7 +438,7 @@ def get(self) -> Dict[str, str]:
438
438
if item .generate () in self .collections :
439
439
collection_returned = item .generate ()
440
440
collection_id = uri .replace (
441
- "{}EntryPoint" .format (DocUrl .doc_url ), "/{} " .format (self .api ))
441
+ "{}EntryPoint" .format (DocUrl .doc_url ), "{}{} " .format (self . url , self .api ))
442
442
collection_to_append = {
443
443
"@id" : collection_id ,
444
444
'title' : collection_returned ['hydra:title' ],
@@ -454,7 +454,7 @@ def get(self) -> Dict[str, str]:
454
454
455
455
else :
456
456
object_ [item .name ] = uri .replace (
457
- "{}EntryPoint" .format (DocUrl .doc_url ), "/{} " .format (self .api ))
457
+ "{}EntryPoint" .format (DocUrl .doc_url ), "{}{} " .format (self . url , self .api ))
458
458
459
459
return object_
460
460
@@ -639,9 +639,10 @@ def __init__(self,
639
639
640
640
def generate (self ) -> Dict [str , Any ]:
641
641
"""Get IriTemplate as a python dict"""
642
+ base_url = DocUrl .doc_url .rsplit ('/' ,2 )[0 ]
642
643
iri_template = {
643
644
"@type" : "hydra:IriTemplate" ,
644
- "hydra:template" : self .template ,
645
+ "hydra:template" : "{}{}" . format ( base_url , self .template ) ,
645
646
"hydra:variableRepresentation" : self .variable_rep ,
646
647
"hydra:mapping" : [x .generate () for x in self .mapping ]
647
648
}
0 commit comments