0% found this document useful (0 votes)
80 views

Backend Assignment - Dream11

The document describes a problem statement to design and implement a program to validate the schema of data returned by REST API responses against provided schemas. The program should make API calls to the given URLs, parse and validate the responses, handle exceptions gracefully, and output parsing results and errors. The solution must include source code, tests, and be submitted with a readme explaining any assumptions.

Uploaded by

Priyanka mestry
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
80 views

Backend Assignment - Dream11

The document describes a problem statement to design and implement a program to validate the schema of data returned by REST API responses against provided schemas. The program should make API calls to the given URLs, parse and validate the responses, handle exceptions gracefully, and output parsing results and errors. The solution must include source code, tests, and be submitted with a readme explaining any assumptions.

Uploaded by

Priyanka mestry
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Design a framework/program to implement the specifications mentioned in the problem

statement below.

Guidelines:
- The program can be written in the programming language of your choice.
- The program needs to be tested to make sure it is validated against the test cases
included in the problem statement and can satisfy similar test cases. [Mandatory]
- You are free to write additional test cases to validate your solution, if required.
- Please do not use the name DREAM11 inside your project. [Mandatory]
- The solution must include the source code and/or build scripts, if required. Please
choose a suitable build tool for the language stack of your choice. We should be able to
run the tests directly from the command line with a simple command. [Mandatory]
- Please ensure you create a local git repository and write frequent and explicit commits to give
us an idea of how your solution evolved (Please do not push the code to any remote public
repo)
- We are interested in seeing how you make assumptions while writing code and if a particular
aspect is not defined in the problem statement then what you do is your choice
- We want to see how YOU solve the problem and create a framework from scratch. Any
plagiarism is highly undesirable and might lower the chances of acceptance.

Steps to submit the assignment:


- Create a folder with your name and put your assignment files/folders into it and also
include a readme with any information/steps/findings/assumptions you want to convey
back to the reviewer.
- Upload it on google drive or any other file sharing drive and then share the link. And
don't forget the give sharing permissions as public to your shared folder.
Problem Statement:
Dream11 is building a schema validation system. The goal of the system is to validate the schema
of the data returned by the REST API. Your goal will be to implement this system, which will call a
set of urls and validate its responses using a schema provided. Below you will find a list of urls and
the validation that needs to be performed.
- When parsing the responses, the program must print the number of objects it parsed. In
case of any parsing errors, the program must print the type of error it encountered and its
number of occurrences. [Mandatory]
- Null values are acceptable default values. If you encounter null values, please print the
number of null occurrences.[Mandatory]
- Assume that your code should be capable of comparing millions of API requests without any
memory issues. [Test with at least 1000 requests]
- Handle exceptions gracefully (don't terminate the program in case of exceptions)

You can read more about JSON schema here http://jsonschema.org. You are free to use any readily
available libraries to perform the validation.

URL Schema

https://bit.ly/35JqSdN {
"web_pages": Array(String),
"name": String,
"alpha_two_code": String,
"stateprovince": String,
"domains": Array(String),
"country": String
}

https://bit.ly/2qVmEBc {
"web_pages": Array(String),
"name": String,
"alpha_two_code": String,
"stateprovince": String,
"domains": Array(String),
"country": String
}

You might also like