How to set required false for property in Stored Search in DocClass - ibm-content-navigator

We have some properties defined in Stored Search Class which are required in Stored Search Class level
In ICN, it is not allowing us to save the search template, as few properties are required.
How can we make these properties required = false and it should allow to save the search template.
How can we achieve this using ICN plugin?

Related

Swagger editor how to specify which fields in request body (POST) are required?

I'm trying to define a POST method on a user class in the online Swagger editor.
I want to be able to specify multiple fields in the request body and I would like the generated documentation to reflect that only 2 fields are required, the others are optional.
What do I have to do/change to make that so?
I have tried various variations with the "required" key word (see picture below for one), but haven't been able to make that work, it doesn't show in the generated documentation (see picture below right side with my annotations in red).
Here is my POST definition in the editor:
Here is the generated documenation preview where I have indicated the things I should like to see changed.
PS. There are some more (olders) posts addressing this, but I really don't think this is a duplicate.
I want to be able to specify multiple fields in the request body and I would like the generated documentation to reflect that only 2 fields are required, the others are optional.
Your second example is correct. To specify the required object properties, add required: [prop1, prop2, ...] on the object level (i.e. alongside type: object). Properties not listed in the required list are optional. If the required list is not provided, all properties are optional.
type: object
required: [email, password] # <--------
properties:
email:
type: string
password:
type: string
name:
type: string
In Swagger UI, operation-specific schema documentation is displayed on the Schema (or Model) tab. That's where the property descriptions, data types, "required" indicators, and other schema info is displayed.
Now I'll have to figure out how to have that "schema" shown as default
To make the Schema/Model tab active by default, configure Swagger UI with the defaultModelRendering option set to "model".

Project Level DrawnBy Parameter in Altium

I have a Schematic template that refers to the DrawnBy parameter and others to fill in the title block. This works fine if I edit each sheet's document parameters to display the correct information. However, I want to use the project parameters to fill in the relevant information.
The schematic documents have default parameters such as, DrawnBy, Revision, etc, that override the project parameters so each sheet needs to be manually edited for author, dates, and revisions.
How do you override the default document parameters with project parameters?
This would be a better fit for the electronics.stackexchange.com site.
On the schematic document or template (sheet), each field is represented by using the custom text =ParameterName. Once you have the document open in the context of a project, you can add project-level parameters via the menu Project > Project Options, Parameters tab. Add the parameter using the same name that was used on the document. All documents sharing the parameter name will inherit the value entered here.
Don't add any parameter to this list that should be unique to each sheet.
For more information:
Altium Designer: Project Options - Parameters
Electronics StackExchange: Project parameters as variable in Altium

Group AEM (6.2) component configurations

I'm currently building a component that has TouchUI configuration properties separated with three tabs (Standard, CASL, GDPR). Each tab has the same set of options available and my current config names are similar to the following:
./standardMarketingText
./standardThirdpartyText
./gdprMarketingText
./gdprThirdpartyText
./caslMarketingText
./caslThirdpartyText
(There are several other options for standard,gdpr,casl but I left them out for brevity)
While this works, I'm hoping to instead store the values in the JCR as a JSON node per category. For example:
casl = {"marketingText"="m test", "thirdpartyText"="tp test"}
gdpr = {"marketingText"="gdpr m test", "thirdpartyText"="gdpr tp test"}
This way I can load all "casl" (or others) options at once when I need them (there isn't a case where I would only load one "casl" option)
I have attempted using granite/ui/components/foundation/form/multifield however, it asks to "Add field". I only want one set of each, and not provide the ability to add another set of properties under each tab. Is there a way to accomplish this without overriding the multifield resourceType?
There are multiple ways to achieve what you are looking at, I would look at the reusability as there are similar named properties for different categories (in your case tabs). To group them you could do that at node level by correctly defining the name property for each tab.
For above provided values, you could do something like -
./standard/marketingText
./standard/thirdpartyText
./gdpr/marketingText
./gdpr/thirdpartyText
./casl/marketingText
./casl/thirdpartyText
Your each tab stores the properties in named node (standard, gdpr, casl). In addition you could have a single SlingModel/WCMUsePojo that can adapt to these nodes to provide the Pojo with accessor to property values.
As far as getting JSON is concerned, your SlingModel or WCMUsePojo can provide a method to return JSON based string for the values.

SAPUI5 Get Control associated with Binding

I know I can get a binding associated with a control via control.getBinding('example').
Is there anyway to go the opposite way like binding.getControl()?
Not sure if this helps, but take a look at the control property "fieldGroupIds". It's used for validation purposes so you can call all the controls linked to that specific field group. You could use this to identify all the controls using that specific binding and calling all the controls linked to that field group. See documentation below:
Field Groups
Accessing Controls in a Field Group:
In some scenarios, it is required to find all controls that belong to a specific field group, or to all controls with a fieldGroupId. For this, the control implements the public getControlsByFieldGroupId method that gets a list of child controls in the application code.
var aAllControlsWithFieldGroupId = myVerticalLayout.getControlsByFieldGroupId(); //all where fieldGroupId is not empty
var aMyGroupControls = myVerticalLayout.getControlsByFieldGroupId("myGroup"); //exact matches to myGroup
Similar to the above you can use the byFieldGroupId method of sap.ui.Core to all controls with certain field group IDs.
var aAllControlsWithFieldGroupId = sap.ui.getCore().byFieldGroupId(); //all where fieldGroupId is not empty
var aMyGroupControls = sap.ui.getCore().byFieldGroupId("MyGroup"); //exact matches to myGroup
var aNotGrouped = sap.ui.getCore().byFieldGroupId([]); //exact empty array (default value of fieldGroupIds)

Zend form change elements required options to false at runtime

I have a form and having two file upload elements. it is like
$data_file_one = $this->createElement('file','data_file_one');
$data_file_one->setRequired(true)
->addValidator('Extension', false, 'csv')
->setDestination($filepath);
Both are set to required true. I use the same form for new post and edit posts. When it is used for editing the file upload should not be mandatory and must be set to required false. So, I need to change
setRequired(true) to setRequired(false)
How can I do when edit action is called to load form and change this element option?
Thanks in advance.
Zend_Forms have a method called getElement that allow you to retrieve an element from a form by its name. This gives you the ability to modify an element's default value before rendering it to the user.
For example, to change a field from being required to being optional, you can do the following:
$form->getElement('data_file_one')->setRequired(false);