This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ballerina.net.http; | |
import ballerina.lang.messages; | |
import ballerina.lang.errors; | |
import ballerina.lang.math; | |
Person[] people = [{name:"Ann", age:30, city:"London"}, {name:"Tim", age:20, city:"New York"}, {name:"John", age:25, city:"Brisbane"}, | |
{name:"Sarah", age:10, city:"Chicago"}, {name:"Trevor", age:45, city:"Cape Town"}]; | |
@http:configuration {basePath: "/people"} | |
service<http> PeopleManagementService { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Person { | |
string first_name; | |
string last_name; | |
int age; | |
string city; | |
} | |
struct User { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ballerina.net.http; | |
struct Address { | |
string address; | |
string street; | |
string state; | |
string city; | |
string zip; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"basePath": "/v2", | |
"definitions": { | |
"Category": { | |
"properties": { | |
"id": { | |
"format": "int64", | |
"type": "integer" | |
}, | |
"name": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"host": "petstore.swagger.io", | |
"info": { | |
"contact": { | |
"email": "apiteam@swagger.io" | |
}, | |
"description": "", | |
"title": "Swagger Petstore", | |
"version": "1.0.0" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"basePath": "/v2", | |
"host": "petstore.swagger.io", | |
"paths": { | |
"/pet": { | |
"post": { | |
"consumes": [ | |
], | |
"description": "", | |
"operationId": "", |