Пример #1
0
        public SwaggerApiCommonDetail showJsonConfigAuthContactUsAPIInfo()
        {
            var apiDetails = new SwaggerApiCommonDetail
            {
                basePath = "http://www.cautom.com/Auth/ContactUs",
                resourcePath = "/ContactUs",
                produces = new string[2] { "application/json", "application/xml" }
            };

            //apiDetails.apiPath = "/Login";

            var operationModel = new operationsModel
            {
                method = "POST",
                apiPath = "/ContactUs",
                summary = "Cautom ContactUs API",
                notes = "Cautom ContactUs API.",
                nickname = "ContactUs"
            };

            var parameters = new parametersModel
            {
                name = "contactUs",
                description = "Cautom ContactUs API",
                required = true,
                paramType = "body",
                allowMultiple = false,
                defaultValue = "",
                type = "contactUs"
            };


            operationModel.parameters = new List<parametersModel> { parameters };

            var responseMessage200 = new ResponseMessageModel { code = "200", message = "Password reset link sent to registered Email ID." };
            
            var responseMessage500 = new ResponseMessageModel { code = "500", message = "Internal Server Error." };
            var responseMessage404 = new ResponseMessageModel { code = "404", message = "User Doesn't exists." };

            var LoyaltyProfileBean = new SwaggerAuthModelsLoyaltyProfileBean
            {
                id = parameters.type,
                //required = new string[4]
            };
            //{"Name":"sumit chourasia","Email":"*****@*****.**","Phone":"9538700019",
            //"Type":"Support related","Message":"A testing contact us message","SendMeACopy":true}
            LoyaltyProfileBean.required = new string[8];
            LoyaltyProfileBean.required[0] = "Name";
            LoyaltyProfileBean.required[1] = "Email";
            LoyaltyProfileBean.required[2] = "Phone";
            LoyaltyProfileBean.required[0] = "Type";
            LoyaltyProfileBean.required[1] = "Message";
            LoyaltyProfileBean.required[2] = "SendMeACopy";


            LoyaltyProfileBean.properties = new Dictionary<string, SwaggerAuthModelsLoyaltyProfileBeanPropertiesAccountName>();
            LoyaltyProfileBean.properties["Name"] = new SwaggerAuthModelsLoyaltyProfileBeanPropertiesAccountName() { type = "YourName" };
            LoyaltyProfileBean.properties["Email"] = new SwaggerAuthModelsLoyaltyProfileBeanPropertiesAccountName() { type = "*****@*****.**" };
            LoyaltyProfileBean.properties["Phone"] = new SwaggerAuthModelsLoyaltyProfileBeanPropertiesAccountName() { type = "9538700019" };
            LoyaltyProfileBean.properties["Type"] = new SwaggerAuthModelsLoyaltyProfileBeanPropertiesAccountName() { type = "Support related" };
            LoyaltyProfileBean.properties["Message"] = new SwaggerAuthModelsLoyaltyProfileBeanPropertiesAccountName() { type = "A testing contact us message" };
            LoyaltyProfileBean.properties["SendMeACopy"] = new SwaggerAuthModelsLoyaltyProfileBeanPropertiesAccountName() { type = "true" };


            operationModel.ResponseMessage = new List<ResponseMessageModel>
            {
                responseMessage200,
                responseMessage500,
                responseMessage404
               
            };

            apiDetails.operations = new List<operationsModel> { operationModel };
            apiDetails.dataType = new List<SwaggerAuthModelsLoyaltyProfileBean> { LoyaltyProfileBean };


            return apiDetails;
        }
Пример #2
0
        public SwaggerApiCommonDetail showJsonConfigAuthResetPasswordAPIInfo()
        {
            var apiDetails = new SwaggerApiCommonDetail
            {
                basePath = "http://www.cautom.com/Auth/ResetPassword",
                resourcePath = "/ResetPassword",
                produces = new string[2] { "application/json", "application/xml" }
            };

            //apiDetails.apiPath = "/Login";

            var operationModel = new operationsModel
            {
                method = "POST",
                apiPath = "/ResetPassword",
                summary = "Cautom ResetPassword Account API",
                notes = "Cautom ResetPassword Account Creation - You need to have UserKey and Guid sent to your registered email id to reset password.",
                nickname = "resetPassword"
            };

            var parameters = new parametersModel
            {
                name = "resetPassword",
                description = "Cautom ResetPassword Account API",
                required = true,
                paramType = "body",
                allowMultiple = false,
                defaultValue = "",
                type = "resetPassword"
            };


            operationModel.parameters = new List<parametersModel> { parameters };

            var responseMessage200 = new ResponseMessageModel { code = "200", message = "Password reset link sent to registered Email ID." };
            var responseMessage402 = new ResponseMessageModel { code = "402", message = "Link Expired." };
            var responseMessage500 = new ResponseMessageModel { code = "500", message = "Internal Server Error." };
            var responseMessage404 = new ResponseMessageModel { code = "404", message = "User Doesn't exists." };

            var LoyaltyProfileBean = new SwaggerAuthModelsLoyaltyProfileBean
            {
                id = parameters.type,
                //required = new string[4]
            };
            //{"Username":"******","Guid":"1f267a9f-863f-488c-8bd1-6fcd65b99c09","Password":"******"}
            LoyaltyProfileBean.required = new string[8];
            LoyaltyProfileBean.required[0] = "Username";
            LoyaltyProfileBean.required[1] = "Guid";
            LoyaltyProfileBean.required[2] = "Password";
            

            LoyaltyProfileBean.properties = new Dictionary<string, SwaggerAuthModelsLoyaltyProfileBeanPropertiesAccountName>();
            LoyaltyProfileBean.properties["Username"] = new SwaggerAuthModelsLoyaltyProfileBeanPropertiesAccountName() { type = "635588348252269728" };
            LoyaltyProfileBean.properties["Guid"] = new SwaggerAuthModelsLoyaltyProfileBeanPropertiesAccountName() { type = "1f267a9f-863f-488c-8bd1-6fcd65b99c09" };
            LoyaltyProfileBean.properties["Password"] = new SwaggerAuthModelsLoyaltyProfileBeanPropertiesAccountName() { type = "NewPassword" };
            

            operationModel.ResponseMessage = new List<ResponseMessageModel>
            {
                responseMessage200,
                responseMessage500,
                responseMessage404,
                responseMessage402
            };

            apiDetails.operations = new List<operationsModel> { operationModel };
            apiDetails.dataType = new List<SwaggerAuthModelsLoyaltyProfileBean> { LoyaltyProfileBean };


            return apiDetails;
        }
Пример #3
0
        public SwaggerApiCommonDetail showJsonConfigAuthForgetPasswordAPIInfo()
        {
            var apiDetails = new SwaggerApiCommonDetail
            {
                basePath = "http://www.cautom.com/Auth/ForgetPassword",
                resourcePath = "/ForgetPassword",
                produces = new string[2] { "application/json", "application/xml" }
            };

            //apiDetails.apiPath = "/Login";

            var operationModel = new operationsModel
            {
                method = "GET",
                apiPath = "/ForgetPassword/{emailId}",
                summary = "Cautom ForgetPassword Account API",
                notes = "Cautom ForgetPassword Account Creation",
                nickname = "forgetPassword"
            };

            var parameters = new parametersModel
            {
                name = "emailId",
                description = "Cautom ForgetPassword Account API",
                required = true,
                paramType = "path",
                allowMultiple = false,
                defaultValue = "",
                type = "forgetPassword"
            };


            operationModel.parameters = new List<parametersModel> { parameters };

            var responseMessage200 = new ResponseMessageModel { code = "200", message = "Password reset link sent to registered Email ID." };
            var responseMessage402 = new ResponseMessageModel { code = "402", message = "Account not Validated yet." };
            var responseMessage500 = new ResponseMessageModel { code = "500", message = "Internal Server Error." };
            var responseMessage404 = new ResponseMessageModel { code = "404", message = "User Doesn't exists." };

            operationModel.ResponseMessage = new List<ResponseMessageModel>
            {
                responseMessage200,
                responseMessage500,
                responseMessage404,
                responseMessage402
            };

            apiDetails.operations = new List<operationsModel> { operationModel };            

            return apiDetails;
        }
Пример #4
0
        public SwaggerApiCommonDetail showJsonConfigAuthResendValidationCodeAPIInfo()
        {
            var apiDetails = new SwaggerApiCommonDetail
            {
                basePath = "http://www.cautom.com/Auth/ValidateAccount",
                resourcePath = "/ResendValidationCode",
                produces = new string[2] { "application/json", "application/xml" }
            };

            //apiDetails.apiPath = "/Login";

            var operationModel = new operationsModel
            {
                method = "POST",
                apiPath = "/ResendValidationCode",
                summary = "Cautom ResendValidationCode Account API",
                notes = "Cautom ResendValidationCode Account Creation",
                nickname = "resendValidationCode"
            };

            var parameters = new parametersModel
            {
                name = "body",
                description = "Cautom ResendValidationCode Account API",
                required = true,
                paramType = "body",
                allowMultiple = false,
                defaultValue = "",
                type = "resendValidationCode"
            };

            

            var LoyaltyProfileBean = new SwaggerAuthModelsLoyaltyProfileBean
            {
                id = parameters.type,
                //required = new string[4]
            };

            //{"userName":"******","guid":"7e1befc7-8185-4f84-bbab-aa754c615eac"}
            LoyaltyProfileBean.required = new string[2];
            LoyaltyProfileBean.required[0] = "userName";
            LoyaltyProfileBean.required[1] = "guid";


            LoyaltyProfileBean.properties = new Dictionary<string, SwaggerAuthModelsLoyaltyProfileBeanPropertiesAccountName>();
            LoyaltyProfileBean.properties["userName"] = new SwaggerAuthModelsLoyaltyProfileBeanPropertiesAccountName() { type = "*****@*****.**" };
            LoyaltyProfileBean.properties["guid"] = new SwaggerAuthModelsLoyaltyProfileBeanPropertiesAccountName() { type = "7e1befc7-8185-4f84-bbab-aa754c615eac" };


            operationModel.parameters = new List<parametersModel> { parameters };

            var responseMessage200 = new ResponseMessageModel { code = "200", message = "Validation link successfully sent to registered Email ID." };
            var responseMessage402 = new ResponseMessageModel { code = "402", message = "Email ID already Validated." };
            var responseMessage500 = new ResponseMessageModel { code = "500", message = "Internal Server Error." };
            var responseMessage404 = new ResponseMessageModel { code = "404", message = "Email Id Doesn't exists." };

            operationModel.ResponseMessage = new List<ResponseMessageModel>
            {
                responseMessage200,
                responseMessage500,
                responseMessage404,
                responseMessage402
            };

            apiDetails.operations = new List<operationsModel> { operationModel };
            apiDetails.dataType = new List<SwaggerAuthModelsLoyaltyProfileBean> { LoyaltyProfileBean };

            return apiDetails;
        }
Пример #5
0
        public SwaggerApiCommonDetail showJsonConfigAuthCreateAccountAPIInfo()
        {
            var apiDetails = new SwaggerApiCommonDetail
            {
                basePath = "http://www.cautom.com/Auth/CreateAccount",
                resourcePath = "/CreateAccount",
                produces = new string[2] { "application/json", "application/xml" }
            };

            //apiDetails.apiPath = "/Login";

            var operationModel = new operationsModel
            {
                method = "POST",
                apiPath = "/CreateAccount",
                summary = "Cautom Create Account API",
                notes = "Cautom Account Creation",
                nickname = "accountCreation"
            };

            var parameters = new parametersModel
            {
                name = "body",
                description = "Cautom Create Account API",
                required = true,
                paramType = "body",
                allowMultiple = false,
                defaultValue = "",
                type = "createAccountModel"
            };

            
            var LoyaltyProfileBean = new SwaggerAuthModelsLoyaltyProfileBean
            {
                id = parameters.type,
                //required = new string[4]
            };

            //{"FirstName":"sumit","LastName":"chourasia","Username":"******",
            //"Password":"******","CompanyName":"myCompany","Type":"client","Source":"web","Referral":"NA"}

            LoyaltyProfileBean.required = new string[8];
            LoyaltyProfileBean.required[0] = "FirstName";
            LoyaltyProfileBean.required[1] = "LastName";
            LoyaltyProfileBean.required[2] = "Username";
            LoyaltyProfileBean.required[3] = "Password";
            LoyaltyProfileBean.required[4] = "CompanyName";
            LoyaltyProfileBean.required[5] = "Type";
            LoyaltyProfileBean.required[6] = "Source";
            LoyaltyProfileBean.required[7] = "Referral";

            LoyaltyProfileBean.properties = new Dictionary<string, SwaggerAuthModelsLoyaltyProfileBeanPropertiesAccountName>();
            LoyaltyProfileBean.properties["FirstName"] = new SwaggerAuthModelsLoyaltyProfileBeanPropertiesAccountName() { type = "Sumit" };
            LoyaltyProfileBean.properties["LastName"] = new SwaggerAuthModelsLoyaltyProfileBeanPropertiesAccountName() { type = "Chourasia" };
            LoyaltyProfileBean.properties["Username"] = new SwaggerAuthModelsLoyaltyProfileBeanPropertiesAccountName() { type = "*****@*****.**" };
            LoyaltyProfileBean.properties["Password"] = new SwaggerAuthModelsLoyaltyProfileBeanPropertiesAccountName() { type = "password" };
            LoyaltyProfileBean.properties["CompanyName"] = new SwaggerAuthModelsLoyaltyProfileBeanPropertiesAccountName() { type = "myCompanyName" };
            LoyaltyProfileBean.properties["Type"] = new SwaggerAuthModelsLoyaltyProfileBeanPropertiesAccountName() { type = "client" };
            LoyaltyProfileBean.properties["Source"] = new SwaggerAuthModelsLoyaltyProfileBeanPropertiesAccountName() { type = "web" };
            LoyaltyProfileBean.properties["Referral"] = new SwaggerAuthModelsLoyaltyProfileBeanPropertiesAccountName() { type = "NA" };


            operationModel.parameters = new List<parametersModel> { parameters };

            var responseMessage200 = new ResponseMessageModel { code = "200", message = "Successfully Created Account. Check Email id provided for guid." };
            var responseMessage409 = new ResponseMessageModel { code = "409", message = "Email ID provided is already registered." };
            var responseMessage500 = new ResponseMessageModel { code = "500", message = "Internal Server Error Occured." };


            operationModel.ResponseMessage = new List<ResponseMessageModel>
            {
                responseMessage200,
                responseMessage409,
                responseMessage500
            };

            apiDetails.operations = new List<operationsModel> { operationModel };
            apiDetails.dataType = new List<SwaggerAuthModelsLoyaltyProfileBean> { LoyaltyProfileBean };

            return apiDetails;
        }
Пример #6
0
        public SwaggerApiCommonDetail showJsonConfigAuthAuthenticationAPIInfo()
        {
            var apiDetails = new SwaggerApiCommonDetail
            {
                basePath = "http://" + Request.Url.Authority + "/Auth",
                resourcePath = "/Auth",
                produces = new string[2] { "application/json", "application/xml" }
            };

            //apiDetails.apiPath = "/Login";

            var operationModel = new operationsModel
            {
                method = "POST",
                apiPath = "/Login",
                summary = "Cautom Auth API",
                notes = "Cautom Authentication",
                nickname = "authentication"
            };

            var parameters = new parametersModel
            {
                name = "body",
                description = "Cautom Auth API",
                required = true,
                paramType = "body",
                allowMultiple = false,
                defaultValue = "",
                type = "authModel"
            };

            
            var LoyaltyProfileBean = new SwaggerAuthModelsLoyaltyProfileBean
            {
                id = parameters.type,
                required = new string[4]
            };

            //{"Username":"******","Password":"******","Type":"web","KeepMeSignedInCheckBox":true}

            LoyaltyProfileBean.required = new string[4];
            LoyaltyProfileBean.required[0] = "Username";
            LoyaltyProfileBean.required[1] = "Password";
            LoyaltyProfileBean.required[2] = "Type";
            LoyaltyProfileBean.required[3] = "KeepMeSignedInCheckBox";
            LoyaltyProfileBean.properties = new Dictionary<string, SwaggerAuthModelsLoyaltyProfileBeanPropertiesAccountName>();
            LoyaltyProfileBean.properties["Username"] = new SwaggerAuthModelsLoyaltyProfileBeanPropertiesAccountName() { type = "*****@*****.**" };
            LoyaltyProfileBean.properties["Password"] = new SwaggerAuthModelsLoyaltyProfileBeanPropertiesAccountName() { type = "password" };
            LoyaltyProfileBean.properties["Type"] = new SwaggerAuthModelsLoyaltyProfileBeanPropertiesAccountName() { type = "web" };
            LoyaltyProfileBean.properties["KeepMeSignedInCheckBox"] = new SwaggerAuthModelsLoyaltyProfileBeanPropertiesAccountName() { type = "true" };

            operationModel.parameters = new List<parametersModel> { parameters };

            var responseMessage200 = new ResponseMessageModel { code = "200", message = "Successfully login" };
            var responseMessage401 = new ResponseMessageModel { code = "401", message = "Unauthorized User" };
            var responseMessage500 = new ResponseMessageModel { code = "500", message = "Internal Server Error Occured" };
            var responseMessage403 = new ResponseMessageModel { code = "403", message = "Database Error Occured" };

            operationModel.ResponseMessage = new List<ResponseMessageModel>
            {
                responseMessage200,
                responseMessage401,
                responseMessage500,
                responseMessage403
            };

            apiDetails.operations = new List<operationsModel> { operationModel };
            apiDetails.dataType = new List<SwaggerAuthModelsLoyaltyProfileBean> { LoyaltyProfileBean };
            
            return apiDetails;
        }