Bonjour
j’ai 5 objets métiers liés selon le diagramme suivant :
Notre client ayant besoin de voir à partir d’un product la liste des structural units auxquel il est lié, nous avons créé un “raccourci”. Ce raccourci est un objet métier “IT4ITProductStructuralUnit” de type select qui remonte les informations product id, product name, structural unit id, structural unit name.
Lors de la création de l’api, on souhaite que le get sur un product retourne le product avec la liste de ses structuralUnit.
addObject("structuralUnits", "IT4ITStructuralUnit");
addField("structuralUnits", "id", "row_id");
addField("structuralUnits", "identifier", "it4itGenIdentifier");
addField("structuralUnits", "name", "it4itGenName");
addObject("products", "IT4ITProduct");
addField("products", "id", "row_id");
addField("products", "identifier", "it4itGenIdentifier");
addField("products", "name", "it4itGenName");
addField("products", "status", "it4itProStatus");
addField("products", "description", "it4itGenDescription");
addField("products", "isRD", "it4itGenRD");
addField("products", "creationDate", "it4itGenCreationDate");
addField("products", "type", "it4itProType");
addField("products", "function", "it4itGenFunction");
addObject("productsStructuralUnits", "IT4ITProductStructuralUnit");
addField("productsStructuralUnits", "id", "row_id");
addRefField("productsStructuralUnits", "productId", "productId", "it4itGenProductId", "Id of the product");
addField("productsStructuralUnits", "productIdentifier", "it4itGenProductId.it4itGenIdentifier", "Identifier of the product", null);
addField("productsStructuralUnits", "productName", "it4itGenProductId.it4itGenName", "Name of the product", null);
addRefField("productsStructuralUnits", "structuralUnitId", "structuralUnitId", "it4itStructuralUnitId", "Id of the structural unit where belongs the delivery team");
addField("productsStructuralUnits", "structuralUnitIdentifier", "it4itStructuralUnitId.it4itGenIdentifier", "Identifier of the structural unit where belongs the delivery team", null);
addField("productsStructuralUnits", "structuralUnitName", "it4itStructuralUnitId.it4itGenName", "Name of the structural unit where belongs the delivery team", null);
addRefField("productsStructuralUnits", "products", "productId", "it4itGenProductId", "belongsTo", true, "Structural unit where the product belongs");
Dans la génération du swagger, l’objet IT4ITProductStructuralUnit expose 2 méthodes GET et GET/{id}.
Nous ne souhaiterions pas qu’il soit possible d’accéder directement à l’objet IT4ITProductStructuralUnit .
Existe-t’il une façon de masquer les 2 méthodes ?
Si non, nous serions obligé de modifier le swagger. Existe-t’il un hook que nous pourrions appeler pendant ou après la génération du swagger afin de le modifier ?
Merci d’avance
[Platform]
Status=OK
Version=4.0.P24
BuiltOn=2020-02-26 22:59 (revision ff84cba0fa5c6a06fda80f27b41502439d1ac3a0)
Encoding=UTF-8
EndpointIP=172.17.0.16
EndpointURL=http://af5bb7d86a98:8080
TimeZone=Europe/Paris
SystemDate=2020-02-28 16:58:02