Skip to content

Instantly share code, notes, and snippets.

{
"$schema": "Productschema",
"id": "Product",
"type": "object",
"properties": {
"ID": {
"id": "ID",
"type": "string"
},
"Name": {
{
"$schema": "UserSchema",
"id": "user",
"type": "object",
"properties": {
"ID": {
"id": "ID",
"type": "string"
},
"username": {
{
"$schema": "CartSchema",
"id": "cart",
"type": "object",
"properties": {
"orderID": {
"id": "orderID",
"type": "string"
},
"orderItems": {
Product:
{
"_id":ObjectId("131233adsad131231233"),
"username":"xyz",
"name":"Godrej 231 Litres RT Eon 231 C 2.3 Frost Free Refrigerator (Silver)",
"category":"Electronics",
"sub_category":"Refridgerator",
"pricing":{
"cost_price":18960,
"discount": 10,
public class Products extends Controller {
public WebSocket<String> products() {
return new WebSocket<String>() {
public void onReady(WebSocket.In<String> in,
WebSocket.Out<String> out) {
in.onMessage(new F.Callback<String>() {
public void invoke(String event) {
public class Products extends Controller {
public CompletionStage<Result> uploadProducts() throws Exception {
return CompletableFuture.supplyAsync(() -> addProductsToCatalog())
.thenApply(i -> ok("Products uploaded: " + i));
}
}
@jadhavj
jadhavj / Sort by number
Created July 26, 2016 17:01
Sort by number
var arrayOfObjects = [
{
name: 'Diana',
born: 1373925600000, // Mon, Jul 15 2013
num: 4,
sex: 'female'
},
{
name: 'Beyonce',
@jadhavj
jadhavj / .gitignore
Last active July 19, 2021 13:28
.gitignore for Scala, SBT with IntelliJ
# Created by Jayesh J.
*.class
*.log
*.iml
*.ipr
*.iws
.idea
out
.cache/
Eg. GET '/v1/rms/property?startPage=5&pageSize=10'
YAML: /v1/rms/property:
get:
tags:
- Property
summary: Returns a list of properties
description: Returns a list of properties
operationId: GetPropertyList
consumes:
GET /v1/user?q="userId,firstName,lastName"