@Override public Optional<String> getDescription() { return caseShorthandNode.getDescription(); }
private String createPath(final DataSchemaNode schemaNode, List<Parameter> pathParams, SchemaContext schemaContext) { ArrayList<LeafSchemaNode> pathListParams = new ArrayList<>(); StringBuilder path = new StringBuilder(); String localName = resolvePathArgumentsName(schemaNode, schemaContext); path.append(localName); if ((schemaNode instanceof ListSchemaNode)) { final List<QName> listKeys = ((ListSchemaNode) schemaNode).getKeyDefinition(); for (final QName listKey : listKeys) { DataSchemaNode dataChildByName = ((DataNodeContainer) schemaNode).getDataChildByName(listKey); pathListParams.add(((LeafSchemaNode) dataChildByName)); String pathParamIdentifier = new StringBuilder("/{").append(listKey.getLocalName()).append("}") .toString(); path.append(pathParamIdentifier); Parameter pathParam = new Parameter(); pathParam.setName(listKey.getLocalName()); pathParam.setDescription(dataChildByName.getDescription()); pathParam.setType("string"); pathParam.setParamType("path"); pathParams.add(pathParam); } } return path.toString(); }
if (dataNodeContainer instanceof ContainerSchemaNode) { reference = new DependencyAttribute(attrNode, serviceInterfaceEntry, mandatory, attrNode.getDescription()); } else { reference = new ListDependenciesAttribute(attrNode, serviceInterfaceEntry, mandatory, attrNode.getDescription());
private List<Operation> operation(DataSchemaNode node, List<Parameter> pathParams, boolean isConfig, Iterable<DataSchemaNode> childSchemaNodes) { List<Operation> operations = new ArrayList<>(); Get getBuilder = new Get(node, isConfig); operations.add(getBuilder.pathParams(pathParams).build()); if (isConfig) { Put putBuilder = new Put(node.getQName().getLocalName(), node.getDescription()); operations.add(putBuilder.pathParams(pathParams).build()); Delete deleteBuilder = new Delete(node); operations.add(deleteBuilder.pathParams(pathParams).build()); if (containsListOrContainer(childSchemaNodes)) { operations.addAll(operationPost(node.getQName().getLocalName(), node.getDescription(), (DataNodeContainer) node, pathParams, isConfig)); } } return operations; }
property.putOpt(DESCRIPTION_KEY, node.getDescription()); properties.put(name, property);
public Get(DataSchemaNode node, boolean isConfig) { this.schemaNode = node; spec = new Operation(); spec.setMethod(METHOD_NAME); spec.setNickname(METHOD_NAME + "-" + node.getQName().getLocalName()); spec.setType((isConfig ? CONFIG : OPERATIONAL) + node.getQName().getLocalName()); spec.setNotes(node.getDescription()); }
private GeneratedTypeBuilder processDataSchemaNode(final Module module, final String basePackageName, final GeneratedTypeBuilder childOf, final DataSchemaNode node) { if (node.isAugmenting() || node.isAddedByUses()) { return null; } final String packageName = packageNameForGeneratedType(basePackageName, node.getPath()); final GeneratedTypeBuilder genType = addDefaultInterfaceDefinition(packageName, node, childOf, module); genType.addComment(node.getDescription()); genType.setDescription(createDescription(node, genType.getFullyQualifiedName())); genType.setModuleName(module.getName()); genType.setReference(node.getReference()); genType.setSchemaPath(node.getPath().getPathFromRoot()); if (node instanceof DataNodeContainer) { genCtx.get(module).addChildNodeType(node, genType); groupingsToGenTypes(module, ((DataNodeContainer) node).getGroupings()); processUsesAugments((DataNodeContainer) node, module); } return genType; }