dojoConfig.app = {
    demo: false,
    uml: false,

    /*
    Flag to control case-insensitive grid sorting - set it to true if "abc" is to be treated the same as "ABC"
    The user can change this value via the corresponding setting in "API Manager settings"
    */
    gridSortIgnoreCase: true,

    /*
    Flag to determine if API collections can be exported as clear text
    Set this value to false if API Export as clear text is not allowed (i.e. the exported file is always encrypted)
    Set this value to true if API Export as clear text is allowed (i.e. the user can choose to encrypt the file or not)
    */
    allowAPIExportAsClearText: false,

    /*
    Allows the Try-It to link to the node manager to view the transaction log.
    */
    nodemanager: 'https://localhost:8090',

    /*
    Allows custom password validation, e.g. you can test for a mix of lower-case,
    upper-case and special characters.  If they validate, return 'true', otherwise,
    return the error message or 'false'.  These rules supplement the
    minimumPasswordLength restriction, as configured in Settings.  E.g.:
    return /(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,}/.test(password);
    */
    validatePassword: function(password) {
        return true;
    },

    /*
    A custom password validation message for invalid passwords, e.g. password must
    be a mix between upper-case, lower-case, mixed-punctuation and special-characters.
    */
    invalidPasswordMessage: '',

    /*
    The login name restrictions are set in API Manager settings.  If you change them there,
    then you should change this message to reflect.
    */
    loginNameValidationMessage: 'The login name cannot contain any of these characters: \\ / ? # < > ; , & !',

    /*
    Specifies whether or not to display the Amplify Connected Menu from the Axway logo.
    This menu is switched on by default.
    */
    showConnectedMenu: true,

    /*
    Specifies the base URL from which to pull the Amplify Connected Menu
    */
    connectedMenuUrl: "https://connectedmenu.admin.axwaytest.net/",

    /*
    Specifies the Regular Expression pattern used to validate HTTP URLs
    */
    urlValidationHttp: "https?:\\" + "/\\" + "/([a-zA-Z0-9-@:%._\\" + "+~#=]{1,256}|(\\" + "${[a-zA-Z0-9-._\" +()\\" + "[\\" + "]]+})+)([a-zA-Z0-9-@:%._\\" + "+~#=\\" + "/?&]|(\\" + "${[a-zA-Z0-9-._\" +()\\" + "[\\" + "]]+}))*",

    /*
    You can define custom properties in this file for user, organization, and
    application entities.  There are three sections below, corresponding to the
    entities.  Custom properties will persist with the entity using the API.
    For user entities, the custom properties can be set during registration.

    Custom properties are defined as a customPropertiesConfig fragment with a
    name, e.g.:

        // A unique property key ID that is not a reserved ID
        mycustomproperty: {
            //
            // A friendly label for the property
            label: 'My Property',
            //
            // Optional.  One of: custom (default), switch, or select
            type: 'custom',
            //
            // Optional, either: false, true.  Overrides permissions
            disabled: false,
            //
            // Optional, either: false, true.
            required: false,
            //
            // Optional, help text
            help: 'This is help text',
            //
            // Optional. Read/write permissions per-role.  By default, the
            // property is read and write by all.
            permissions: {
                admin: { read: true, write: true },
                oadmin: { read: true, write: true },
                user: { read: true, write: true }
            },
            //
            // Optional, but required for 'switch' and 'select'
            options: [
                {value: true, label: 'One'},
                {value: 'ii', label: 'Two'},
                {value: 3, label: 'Three'}
            ]
        }
    */
    customPropertiesConfig: {
	   user: {
	    // custom properties...
	     newsletter:{
	        label:'newsletter'
	     },
	    date_consentement_newsletter:{
	        label:'Date consentement newsletter'
	    },
	    satisfaction: {
	        label:'satisfaction'
	     },
	    date_consentement_enquete:{
	        label:'Date consentement enquête'
	    },
	    consentement: {
	        label:'Consentement CGU',
	        permissions: {
	            admin: { read: true, write: true},
	            oadmin: { read: false, write: false },
	            user: { read: false, write: false }
	        }
	      }
	    },
        organization: {
            // custom properties...
         Critical:{
            label:'critique',
            required: true
         },
         visible:{
            label:'Visible',
            required: true,
            type:'select',
            options: [
                {value:'No',label: 'No'},
                {value:'Yes',label: 'Yes'}
            ]
        }
        },
        application: {
            // custom properties...
        ContactName: {
        label: "Responsable d'application",
        required: true
        },
        NumberStructure: {
        label: 'Numero de Structure'
        }
        },
        api: {
            // custom properties...
        CGU:{
        label: 'Nom Fichier CGU',
        help:  'Le nom du fichier CGU est défini sous la forme NomAPI_VersionAPI'
          },
        need_approval:{
            label:'Soumis à validation',
            required:true,
            type:'select',
            options: [
                {value:'No',label: 'No'},
                {value:'Yes',label: 'Yes'}
            ]
          },
        approver_email:{
           label: 'Email approbateur API'

        }
        }
    },

    wizardModels: {
        "$Item": {
            "type": "object",
            "required": [
                "id",
                "name"
            ],
            "properties": {
                "id": {
                    "type": "string",
                    "description": "The item's unique identifier"
                },
                "name": {
                    "type": "string",
                    "description": "The $item's name"
                }
            }
        },
        "$ItemArray": {
            "type": "array",
            "items": {
                "$ref": "$Item"
            }
        }
    },
    wizardCrudTemplates: {
        create: {
            verb: 'POST',
            name: 'Create $item',
            summary: 'Creates a new instance of $item.',
            description: 'The $item can only be created if you have permissions to create.  Otherwise, a **403 Forbidden** error is returned. ' +
                   'If the *body* parameter is not a valid *$Item*, then a **400 Bad Request** error is returned.  On success, **201 Created** is returned.',
            path: '/$path',
            returnType: '$Item',
            produces: [
                'application/json'
            ],
            consumes: [
                'application/json'
            ],
            parameters: [
                {
                    name: 'body',
                    paramType: 'body',
                    description: 'The $item to create',
                    type: '$Item',
                    required: true,
                    allowMultiple: false
                }
            ],
            responseCodes: [
                {code: 201, message: 'Created', schema: {'$ref':'#/models/$Item'}},
                {code: 400, message: 'Bad Request'},
                {code: 403, message: 'Forbidden'},
                {code: 500, message: 'Internal Server Error'}
            ]
        },
        retrieve: {
            verb: 'GET',
            name: 'Get $item',
            summary: 'Gets an existing $item by id.',
            description: 'Gets $item by id.',
            path: '/$path/{id}',
            returnType: '$Item',
            produces: [
                'application/json'
            ],
            consumes: [
                'application/json'
            ],
            parameters: [
                {
                    name: 'id',
                    paramType: 'path',
                    description: 'The $item identifier',
                    type: 'string',
                    required: true,
                    allowMultiple: false
                }
            ],
            responseCodes: [
                {code: 200, message: 'OK', schema: {'$ref':'#/models/$Item'}},
                {code: 404, message: 'Not found'},
                {code: 500, message: 'Internal Server Error'}
            ]
        },
        retrieveAll: {
            verb: 'GET',
            name: 'Get all $item',
            summary: 'Gets a collection of $item.',
            description: 'Queries all $item.  An optional parameter, *search* can be used to filter the list of *$Item*.  On success, **200 OK** is returned, even if no items were found.',
            path: '/$path',
            returnType: '$ItemArray',
            produces: [
                'application/json'
            ],
            consumes: [
                'application/json'
            ],
            parameters: [
                {
                    name: 'search',
                    paramType: 'query',
                    description: 'Text to use to find $item',
                    type: 'string',
                    required: false,
                    allowMultiple: true
                }
            ],
            responseCodes: [
                {code: 200, message: 'OK', schema: {'$ref':'#/models/$ItemArray'}},
                {code: 500, message: 'Internal Server Error'}
            ]
        },
        update: {
            verb: 'PUT',
            name: 'Update $item',
            summary: 'Updates an existing $item by id.',
            description: 'The $item can only be updated if you have permissions to update.  Otherwise, a **403 Forbidden** error is returned. ' +
                   'If the *body* parameter is not a valid *$Item*, then a **400 Bad Request** error is returned.  On success, **200 OK** is returned.\n',
            path: '/$path/{id}',
            returnType: '$Item',
            produces: [
                'application/json'
            ],
            consumes: [
                'application/json'
            ],
            parameters: [
                {
                    name: 'id',
                    paramType: 'path',
                    description: 'The $item identifier',
                    type: 'string',
                    required: true,
                    allowMultiple: false
                },
                {
                    name: 'body',
                    paramType: 'body',
                    description: 'The $item to update',
                    type: '$Item',
                    required: true,
                    allowMultiple: false
                }
            ],
            responseCodes: [
                {code: 200, message: 'OK', schema: {'$ref':'#/models/$Item'}},
                {code: 400, message: 'Bad Request'},
                {code: 403, message: 'Forbidden'},
                {code: 500, message: 'Internal Server Error'}
            ]  
        },
        remove: {
            verb: 'DELETE',
            name: 'Delete $item',
            summary: 'Delete an existing $item by id.',
            description: 'The $item can only be updated if you have permissions to delete.  Otherwise, a **403 Forbidden** error is returned. ' +
                   'If the *id* parameter is not valid or not found, then a **400 Bad Request** error is returned.  On success, **204 No Content** is returned.',
            path: '/$path/{id}',
            returnType: 'void',
            produces: [
                'application/json'
            ],
            consumes: [
                'application/json'
            ],
            parameters: [
                {
                    name: 'id',
                    paramType: 'path',
                    description: 'The $item identifier',
                    type: 'string',
                    required: true,
                    allowMultiple: false
                }
            ],
            responseCodes: [
                {code: 204, message: 'No Content'},
                {code: 403, message: 'Forbidden'},
                {code: 500, message: 'Internal Server Error'}
            ]
        }
    }
};

