Code-Wizard Documentation
  • 👋Welcome to Code-Wizard
  • Introduction
    • 💡What we do
    • ✨Code-Wizard Features
      • Design Library
      • Excel Editor to Code Generation
      • Text File to Code Generation
      • Audio File to Code Generation
      • Ping Chat bot to Generate Code
      • Industry specific screen library
      • Our Technology Stack
      • Streamlined Deployments
      • Full Stack Frameworks
      • Capability-Docker/Docker Compose
      • Capability-Authentication & Authorization(Auth0)
      • Capability-Authentication & Authorization(OAuth)
      • Capability-Authentication & Authorization(Basic)
      • Capability-Authentication & Authorization (Spring)
      • Capability-Razorpay
      • Capability-Hazlecast
      • Capability-Redis Cache
      • Capability-User Management
    • ✍️Prerequisites for Application Project
  • 🇨🇱Using Code-Wizard
    • 📎Create Projects
      • How to create a back-end web application
      • How to create a front-end web application
      • How to create entire project in single go
      • Web-Development Framework Project
      • How to create both front&back end projects
    • 🈸Front-end TechStack
      • React
        • 🛂Supported Features
      • OpenUI5
      • Html
      • Angular
      • Flutter
      • Vue JS
    • 🈸Back-end TechStack
      • 🪶Spring OData
        • 🛂Supported Features
      • 🧊Spring Boot
      • Servlet
      • Python
      • NodeJS
      • Blockchain
    • 📗Templates-Screens
  • Fundamentals
    • 🛠️Getting set up
      • 📝Setting permissions
      • 🧑Inviting Members
  • Use Cases
    • Page 1
    • 🖥️For Developers
      • React Applications
      • Spring Odata Applications
    • 🦹‍♂️For Users
Powered by GitBook
On this page
  1. Use Cases

For Developers

This part of documentation is helpful for Developers in order to use the Product "Codewizard" and how it is working.

Good to know: depending on the product, you will find here all the details from where to start and what is needed.

Table of Content
  • Development steps and process

  1. Creating a model using Staruml (An open source software)

  2. Verifying the model

  3. Converting UML design to XML

  4. Generating the Code

  5. Running, deploying the Code

  6. Using Postman(An open source software) to access the API

  1. Create simple design for your functional requirements using Staruml

First, give the details of all the requirements using uml diagram with various classes and assocations or in xml/edmx format.

(A) If the requirements are in the xml format, you can move ahead to step-4.

(B) If you're considering uml diagram then provide all the requirements with classes and associations. Please follow all the steps.

  1. Verify the design

UML Diagram must have the following necessary things:

  • There can be n number of classes and associations in design model as needed. Classes can be of Entity Type, Complex Type or Enum Type.

  • Each and every entity type class should have the id.

  • String, Int, Long, DateTimeOffset etc. are some examples of the type of properties.

  • Provide the names for the associations and provide multiplicity to end2 in diagram

  1. Running the code

We eventually have one application for running the code, for this you need to use postman.

Use post request, inside body, you will see 'githubURL' key, provide the value which you after running 'OdataV4SpringCodeGenerator.java'.

For example:

"gitHubURL": "https://github.com/codewizard-replicacia/backend_generated_app_c887d3eb_fdc1_47a6_b821_7c486798c791.git",
"applicationServiceName": "generated_app"

  1. Access the API using Postman

You will get postman_collection file from the generated code, inside of source_code folder, check the latest generated code, click on that, look at src folder then resources,

here you will find one file named with Postman_Collection.

You can rename this and import it in Postman. Now, you will see API, you can send get, post, delete and patch requests.

Some examples of using different requests are given below:

Get Request =

url = {{host}}/{{servletname}}/ShoppingCarts

or

url = {{host}}/{{servletname}}/ShoppingCarts(id)

here you can provide the values for host and servletname as needed.

Post Request =

url = {{host}}/{{servletname}}/ShoppingCarts

body =

{
    "CartId": 63,
    "Quantity": 46,
    "Amount": 541045.78,
    "Products": [
        {
            "ProductName": "Opaline Dutta MD",
            "IconName": "Samir Gill",
            "ProductDescription": "skid"
        }
    ]
}

Get raw value of Id

{{host}}/{{servletname}}/ShoppingCarts(CartId)/CartId/$value

Get Request filter option

{{host}}/{{servletname}}/ShoppingCarts?$filter=CartId eq 63

Navigation Request(One to Many)

{{host}}/{{servletname}}/ShoppingCarts(2)/Products

Get Request expand option

{{host}}/{{servletname}}/ShoppingCarts(2)?$expand=Products

Delete Request =

URL = {{host}}/{{servletname}}/ShoppingCarts(1)

You will see no content in response after succesfully completion of request .

System Query Option 1 =

GET raw value of Any Property

URL = {{host}}/{{servletname}}/ShoppingCarts(id)/Quantity/$value

Id field value can be of type Integer like: 1,2,3.. or it may be of any other data type.

GET $filter option = gives only entity set that has quailty as assigned value in url.

URL = {{host}}/{{servletname}}/ShoppingCarts?$filter=Quantity eq 46

System Query Option 3 =

If you have enum type in your model file, there is one API:

Get $filter option on enum = {{host}}/{{servletname}}/ModelFiles?$filter=ModelType eq generated_app.ModelType'EDMX'

System Query Option 4 =

GET #orderBy option on Date field entity set = This will give the response with

URL = {{host}}/{{servletname}}/ShoppingCarts?$orderby=<<Replace with property name>> desc

Get $count option = This gives you total number of entity set.

URL = {{host}}/{{servletname}}/ShoppingCarts/$count

GET $top option = Here assign the number of entityset that you want to see from top.

URL = {{host}}/{{servletname}}/ShoppingCarts?$top=2

GET $skip option = This will skip the entity set according to the given number.

URL= {{host}}/{{servletname}}/ShoppingCarts?$skip=2

Patch Request =

URL = {{host}}/{{servletname}}/ShoppingCarts(id)

If patch request is not working, then you can see error, try removing Id property from body.

{
    "CartId":2, // Remove this id property
    "Quantity": 46,
    "Amount": 541045.78
}

Please visit to the links to download the software.

PreviousPage 1NextReact Applications

Last updated 11 months ago

🖥️
Download Postman | Get Started for FreePostman
Download PuTTY - a free SSH and telnet client for Windows
StarUML
Logo
Eclipse Downloads | The Eclipse FoundationEclipseFdn
Logo
Logo