While Freddy Copilot for Developers is an incredibly powerful AI-driven tool, it's important to remember that no generative AI-powered tool is perfect. In this section, we'll guide you through the crucial step of thoroughly verifying the code generated by Freddy Copilot. This verification process ensures that the code aligns precisely with your app's vision and requirements.
You'll learn how to review, test, and fine-tune the generated code to guarantee that your Bitly URL shortener app functions flawlessly. By performing this verification, you'll have complete control and confidence in your app's functionality and can make any necessary adjustments. So, let's ensure your creation is nothing short of perfect!
This tutorial is designed using Freddy Copilot for Developers version v2.0.2. The generated code is subject to change based on user prompt used and version of Freddy Copilot for Developers being used as it is currently under beta program.
Navigate to newly created app, verify the manifest.json. Validate it for accuracy. The following section need to validated for accuracy
- Product name : Same as the selected one
- Placeholder : Location should be same as the inferred one at the time of creation, you can update it if needed.
- Request Template : make note of the template name under requests
- SMI Function : make note of the SMI function name under functions
Navigate to config/requests.json,
- ensure you have a template with name same as that in requests section.
- If there is a an iparam being used, ensure it is <%= iparam.<iparam-name> %> not <%= iparams.<iparam-name> %>
- Make a note of the iparam-name
Validate your config/iparams.json
- Ensure your name matches that of in the config/requests.json
- The iparam type should be text, required and secure are set to true
Validate your app/scripts/app.js,
- Ensure there is an init() method and is being invoked.
- If the manifest.json has a SMI name in it, then validate if app.js have its invocation via client.request.invoke.
Validate your app/index.html,
- Ensure there are no non-html elements in the page
- Ensure that element IDs being used in app.js and index.html are same. For instance, getElementById("submit-url") in app.js has an equivalent html element with id submit-url.
Validate your server/server.js
- It must have an SMI function with same name as that in manifest.json
- It must have an requst template invocation via $request.invokeTemplate