swagger2postman
swagger2postman copied to clipboard
Web demo didn't work for my swagger.json file
I have a swagger json file version 2.0 and your web demo didn't generate postman json for me.
{
"paths": {
"/ping": {
"get": {
"operationId": "ping",
"tags": [
"HealthyCheck"
],
"summary": "Checking Sevice status.",
"description": "Return OK status when POK 9 are running",
"responses": {
"200": {
"description": "Ok"
}
}
}
},
"/api/v1/profiles/favourites": {
"get": {
"operationId": "get",
"tags": [
"Favourite"
],
"parameters": [
{
"name": "Authorization",
"description": "Jwt Token key.",
"in": "header",
"required": true,
"type": "string",
"format": "string",
"default": "xxxx"
},
{
"in": "query",
"name": "type",
"type": "string",
"required": true
}
],
"responses": {
"200": {
"description": "Success to get favourites list",
"schema": {
"$ref": "#/definitions/response.models.Success_Favourite_Stark"
}
},
"404": {
"description": "Failure to get favourites list",
"schema": {
"$ref": "#/definitions/response.models.Failure"
}
}
}
},
"post": {
"operationId": "add",
"tags": [
"Favourite"
],
"parameters": [
{
"name": "Authorization",
"description": "Jwt Token key.",
"in": "header",
"required": true,
"type": "string",
"format": "string",
"default": "xxxx"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/controllers.parameters.FavouriteParams"
}
}
],
"responses": {
"200": {
"description": "Success to add favourites list",
"schema": {
"$ref": "#/definitions/response.models.Success_Favourite"
}
},
"404": {
"description": "Failure to add favourites list",
"schema": {
"$ref": "#/definitions/response.models.Failure"
}
}
}
},
"delete": {
"operationId": "remove",
"tags": [
"Favourite"
],
"parameters": [
{
"name": "Authorization",
"description": "Jwt Token key.",
"in": "header",
"required": true,
"type": "string",
"format": "string",
"default": "xxxx"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/controllers.parameters.FavouriteParams"
}
}
],
"responses": {
"200": {
"description": "Success to remove favourites list",
"schema": {
"$ref": "#/definitions/response.models.Success_Favourite"
}
},
"404": {
"description": "Failure to remove favourites list",
"schema": {
"$ref": "#/definitions/response.models.Failure"
}
}
}
}
},
"/api/v1/profiles": {
"put": {
"operationId": "upsertProfileDescription",
"tags": [
"Profile"
],
"summary": "update descriptions profile.",
"parameters": [
{
"name": "Authorization",
"description": "Jwt Token key.",
"in": "header",
"required": true,
"type": "string",
"format": "string",
"default": "xxxx"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/models.UpsertProfileRequest"
}
}
],
"responses": {
"200": {
"description": "Success to updated description Profile",
"schema": {
"$ref": "#/definitions/response.models.Success_UpdateDescription"
}
},
"404": {
"description": "Failure to updated description Profile",
"schema": {
"$ref": "#/definitions/response.models.Failure"
}
}
}
},
"get": {
"operationId": "getOwnerProfileByJWT",
"tags": [
"Profile"
],
"description": "The Profile endpoint returns information about the User profile.",
"parameters": [
{
"name": "Authorization",
"description": "Jwt Token key.",
"in": "header",
"required": true,
"type": "string",
"format": "string",
"default": "xxxx"
}
],
"summary": "User Profile.",
"responses": {
"200": {
"description": "Success to get Profile details",
"schema": {
"$ref": "#/definitions/response.models.Success_Profile"
}
},
"404": {
"description": "Failure to get Profile details",
"schema": {
"$ref": "#/definitions/response.models.Failure"
}
}
}
}
},
"/api/v1/profiles/{id}": {
"get": {
"operationId": "getOtherProfile",
"tags": [
"Profile"
],
"parameters": [
{
"name": "Authorization",
"description": "Jwt Token key.",
"in": "header",
"required": true,
"type": "string",
"format": "string",
"default": "xxxx"
},
{
"in": "path",
"name": "id",
"description": "The user id field is used to defined who we want to know his profiles.",
"type": "string",
"default": "user:xxx-xxx",
"required": true
}
],
"description": "The Profile endpoint returns information about the User profile.",
"summary": "look other user profile",
"responses": {
"200": {
"description": "Success to get other Profile details",
"schema": {
"$ref": "#/definitions/response.models.Success_OtherProfile"
}
},
"404": {
"description": "Failure to get other Profile details",
"schema": {
"$ref": "#/definitions/response.models.Failure"
}
}
}
}
},
"/api/v1/profiles/lookup": {
"post": {
"operationId": "getOthersProfile",
"tags": [
"Profile"
],
"description": "The Profile endpoint returns information about the User profile.",
"parameters": [
{
"name": "Authorization",
"description": "Jwt Token key.",
"in": "header",
"required": true,
"type": "string",
"format": "string",
"default": "xxxx"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/models.UsersRequest"
}
}
],
"summary": "look profiles of user followings",
"responses": {
"200": {
"description": "Success to get my followings Profile details",
"schema": {
"$ref": "#/definitions/response.models.Success_lookupProfile"
}
},
"404": {
"description": "Failure to get my followings Profile details",
"schema": {
"$ref": "#/definitions/response.models.Failure"
}
}
}
}
},
"/api/v1/profiles/{userId}/followers": {
"get": {
"operationId": "lookFollowers",
"tags": [
"Following and Follower"
],
"parameters": [
{
"name": "Authorization",
"description": "Jwt Token key.",
"in": "header",
"required": true,
"type": "string",
"format": "string",
"default": "xxxx"
},
{
"in": "path",
"name": "userId",
"description": "The user id field is used to defined who we want to know his followers.",
"type": "string",
"required": true,
"default": "user:xxx-xxx"
},
{
"in": "query",
"name": "listkey",
"description": "listkey is provide for Glacier service. For now it can use only listkey=id the result will. only list user id of followers",
"type": "string",
"required": false,
"default": "listkey=id"
},
{
"in": "query",
"name": "limit",
"description": "The limit field is used to limit the number of results returned in a Database.",
"type": "integer",
"format": "int32",
"required": false,
"default": 50
},
{
"in": "query",
"name": "offset",
"description": "The offset field is used to skip that many rows before beginning to return rows.",
"type": "integer",
"format": "int32",
"default": 0,
"required": false
}
],
"summary": "look followers list of userId",
"responses": {
"200": {
"description": "Success to get followers list of that user",
"schema": {
"$ref": "#/definitions/response.models.Success_followers"
}
},
"404": {
"description": "Failure to look followers list of that user",
"schema": {
"$ref": "#/definitions/response.models.Failure"
}
}
}
}
},
"/api/v1/profiles/{userId}/followings": {
"get": {
"operationId": "lookFollowings",
"tags": [
"Following and Follower"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "Jwt Token key.",
"required": true,
"type": "string",
"format": "string",
"default": "xxxx"
},
{
"in": "path",
"name": "userId",
"description": "The user id field is used to defined who we want to know his followings.",
"type": "string",
"required": true,
"default": "user:xxx-xxx"
},
{
"in": "query",
"name": "limit",
"description": "The limit field is used to limit the number of results returned in a Database.",
"type": "integer",
"format": "int32",
"required": false,
"default": 50
},
{
"in": "query",
"name": "offset",
"description": "The offset field is used to skip that many rows before beginning to return rows.",
"type": "integer",
"format": "int32",
"required": false,
"default": 0
}
],
"summary": "look followings list of userId",
"responses": {
"200": {
"description": "Success to get followings list of that user",
"schema": {
"$ref": "#/definitions/response.models.Success_followings"
}
},
"404": {
"description": "Failure to get followings list of that user",
"schema": {
"$ref": "#/definitions/response.models.Failure"
}
}
}
},
"post": {
"operationId": "createFollowing",
"tags": [
"Following and Follower"
],
"parameters": [
{
"name": "Authorization",
"description": "Jwt Token key.",
"in": "header",
"required": true,
"type": "string",
"format": "string",
"default": "xxxx"
},
{
"in": "path",
"name": "userId",
"description": "The user id field is used to defined who we want to following him/her.",
"type": "string",
"required": true,
"default": "user:xxx-xxx"
}
],
"summary": "following user",
"responses": {
"200": {
"description": "Success to get followings list of that user",
"schema": {
"$ref": "#/definitions/response.models.Success_followResponse"
}
},
"404": {
"description": "Failure to get followings list of that user",
"schema": {
"$ref": "#/definitions/response.models.Failure"
}
}
}
},
"delete": {
"operationId": "deleteFollowing",
"tags": [
"Following and Follower"
],
"parameters": [
{
"name": "Authorization",
"description": "Jwt Token key.",
"in": "header",
"required": true,
"type": "string",
"format": "string",
"default": "xxxx"
},
{
"in": "path",
"name": "userId",
"description": "The user id field is used to defined who we want to unfollow him/her.",
"type": "string",
"required": true,
"default": "user:xxx-xxx"
}
],
"summary": "unfollow user",
"responses": {
"200": {
"description": "Success to get followings list of that user",
"schema": {
"$ref": "#/definitions/response.models.Success_followResponse"
}
},
"404": {
"description": "Failure to get followings list of that user",
"schema": {
"$ref": "#/definitions/response.models.Failure"
}
}
}
}
},
"/api/v1/profiles/cover_photo": {
"post": {
"operationId": "upload",
"tags": [
"Cover photo"
],
"produces": [
"application/json"
],
"consumes": [
"multipart/form-data"
],
"parameters": [
{
"name": "Authorization",
"description": "Jwt Token key.",
"in": "header",
"required": true,
"type": "string",
"format": "string",
"default": "xxxx"
},
{
"name": "file",
"in": "formData",
"required": true,
"type": "file",
"description": "file size 2 MB."
}
],
"summary": "upload cover photo to profile",
"responses": {
"200": {
"description": "Success to uploaded cover photo",
"schema": {
"$ref": "#/definitions/response.models.Success_Attachment"
}
},
"404": {
"description": "Failure to upload cover photo",
"schema": {
"$ref": "#/definitions/response.models.Failure"
}
}
}
}
}
},
"definitions": {
"models.OwnerProfile": {
"properties": {
"user_id": {
"type": "string"
},
"cover_photo": {
"$ref": "#/definitions/models.Photo"
},
"avatar_photo": {
"$ref": "#/definitions/models.Photo"
},
"first_name": {
"type": "string"
},
"middle_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"description": {
"type": "string"
},
"followers": {
"type": "integer",
"format": "int64"
},
"following": {
"type": "integer",
"format": "int64"
}
},
"required": [
"user_id",
"cover_photo",
"avatar_photo",
"first_name",
"middle_name",
"last_name",
"description",
"followers",
"following"
]
},
"models.OtherProfile": {
"properties": {
"user_id": {
"type": "string"
},
"cover_photo": {
"$ref": "#/definitions/models.Photo"
},
"avatar_photo": {
"$ref": "#/definitions/models.Photo"
},
"first_name": {
"type": "string"
},
"middle_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"description": {
"type": "string"
},
"followers": {
"type": "integer",
"format": "int64"
},
"following": {
"type": "integer",
"format": "int64"
},
"isFollow": {
"type": "boolean"
}
},
"required": [
"user_id",
"cover_photo",
"avatar_photo",
"first_name",
"middle_name",
"last_name",
"description",
"followers",
"following"
]
},
"models.Photo": {
"properties": {
"id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"id",
"url"
]
},
"models.LookupOtherProfile": {
"properties": {
"user_id": {
"type": "string"
},
"first_name": {
"type": "string"
},
"middle_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"url_avatar": {
"type": "string"
},
"is_following": {
"type": "boolean"
}
},
"required": [
"user_id",
"first_name",
"middle_name",
"last_name",
"url_avatar",
"is_following"
]
},
"models.MyFollowing": {
"properties": {
"user_id": {
"type": "string"
},
"first_name": {
"type": "string"
},
"middle_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"url_avatar": {
"type": "string"
},
"is_following": {
"type": "boolean"
}
},
"required": [
"user_id",
"first_name",
"last_name",
"url_avatar",
"is_following"
]
},
"models.UserFollowing": {
"properties": {
"user_id": {
"type": "string"
},
"follow_data": {
"type": "array",
"items": {
"$ref": "#/definitions/models.MyFollowing"
}
}
},
"required": [
"user_id",
"follow_data"
]
},
"models.FollowResponse": {
"properties": {
"user_id": {
"type": "string"
},
"follow_id": {
"type": "string"
},
"is_following": {
"type": "boolean"
},
"first_name": {
"type": "string"
},
"middle_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"url_avatar": {
"type": "string"
},
"following_count": {
"type": "integer",
"format": "int32"
}
},
"required": [
"user_id",
"follow_id",
"is_following",
"first_name",
"last_name",
"url_avatar",
"following_count"
]
},
"models.UserFollower": {
"properties": {
"user_Id": {
"type": "string"
},
"follow_data": {
"type": "array",
"items": {
"$ref": "#/definitions/models.MyFollower"
}
}
},
"required": [
"user_Id",
"follow_data"
]
},
"models.MyFollower": {
"properties": {
"user_id": {
"type": "string"
},
"first_name": {
"type": "string"
},
"middle_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"url_avatar": {
"type": "string"
},
"is_following": {
"type": "boolean"
}
},
"required": [
"user_id"
]
},
"models.Attachment": {
"properties": {
"id": {
"type": "string"
},
"file_name": {
"type": "string"
},
"type": {
"type": "string"
},
"file_size": {
"type": "integer",
"format": "int64"
},
"url": {
"type": "string"
},
"status": {
"type": "string"
}
},
"required": [
"id"
]
},
"models.StarkImgSize": {
"properties": {
"file_name": {
"type": "string"
},
"file_size": {
"type": "integer",
"format": "int64"
},
"url": {
"type": "string"
}
},
"required": [
"file_name",
"file_size",
"url"
]
},
"models.StarkImgSizes": {
"properties": {
"small": {
"$ref": "#/definitions/models.StarkImgSize"
},
"medium": {
"$ref": "#/definitions/models.StarkImgSize"
},
"large": {
"$ref": "#/definitions/models.StarkImgSize"
},
"extra_large": {
"$ref": "#/definitions/models.StarkImgSize"
},
"low_resolution": {
"$ref": "#/definitions/models.StarkImgSize"
}
}
},
"models.StarkImg": {
"properties": {
"image_id": {
"type": "string"
},
"image_url": {
"type": "string"
},
"sizes": {
"type": "array",
"items": {
"$ref": "#/definitions/models.StarkImgSizes"
}
}
},
"required": [
"image_id",
"image_url",
"sizes"
]
},
"models.Stark": {
"properties": {
"product_id": {
"type": "string"
},
"shop_id": {
"type": "string"
},
"title": {
"type": "string"
},
"shop_title": {
"type": "string"
},
"description": {
"type": "string"
},
"category": {
"type": "string"
},
"price": {
"type": "integer",
"format": "int64"
},
"point": {
"type": "integer",
"format": "int32"
},
"price_reward": {
"type": "integer",
"format": "int64"
},
"point_back": {
"type": "integer",
"format": "int64"
},
"stock": {
"type": "integer",
"format": "int32"
},
"view": {
"type": "integer",
"format": "int32"
},
"order": {
"type": "integer",
"format": "int32"
},
"delivery_method": {
"type": "string"
},
"images": {
"type": "array",
"items": {
"$ref": "#/definitions/models.StarkImg"
}
},
"status": {
"type": "string"
}
},
"required": [
"product_id",
"shop_id",
"title",
"shop_title",
"description",
"category",
"price",
"point",
"price_reward",
"point_back",
"stock",
"view",
"order",
"delivery_method",
"images",
"status"
]
},
"models.UsersRequest": {
"properties": {
"users": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"users"
]
},
"models.UpsertProfileRequest": {
"properties": {
"description": {
"type": "string"
}
},
"required": [
"description"
],
"type": "object"
},
"controllers.parameters.FavouriteParams": {
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
],
"type": "object"
},
"response.models.Success_Favourite_Stark": {
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/models.Stark"
}
},
"code": {
"type": "integer",
"format": "int32"
}
}
},
"response.models.Failure": {
"properties": {
"error": {
"$ref": "#/definitions/ErrorMessage"
},
"code": {
"type": "integer",
"format": "int32"
}
}
},
"response.models.Success_Attachment": {
"properties": {
"data": {
"$ref": "#/definitions/models.Attachment"
},
"code": {
"type": "integer",
"format": "int32"
}
}
},
"response.models.Success_followers": {
"properties": {
"data": {
"$ref": "#/definitions/models.UserFollower"
},
"code": {
"type": "integer",
"format": "int32"
}
}
},
"response.models.Success_followResponse": {
"properties": {
"data": {
"$ref": "#/definitions/models.FollowResponse"
},
"code": {
"type": "integer",
"format": "int32"
}
}
},
"response.models.Success_followings": {
"properties": {
"data": {
"$ref": "#/definitions/models.UserFollowing"
},
"code": {
"type": "integer",
"format": "int32"
}
}
},
"response.models.Success_lookupProfile": {
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/models.LookupOtherProfile"
}
},
"code": {
"type": "integer",
"format": "int32"
}
}
},
"response.models.Success_UpdateDescription": {
"properties": {
"data": {
"$ref": "#/definitions/models.UpsertProfileRequest"
},
"code": {
"type": "integer",
"format": "int32"
}
}
},
"response.models.Success_OtherProfile": {
"properties": {
"data": {
"$ref": "#/definitions/models.OtherProfile"
},
"code": {
"type": "integer",
"format": "int32"
}
}
},
"ErrorMessage": {
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"info": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"response.models.Success_Profile": {
"properties": {
"data": {
"$ref": "#/definitions/models.OwnerProfile"
},
"code": {
"type": "integer",
"format": "int32"
}
}
},
"response.models.Success_Favourite": {
"properties": {
"data": {
"type": "boolean"
},
"code": {
"type": "integer",
"format": "int32"
}
}
}
},
"tags": [
{
"name": "routes"
}
],
"securityDefinitions": {
"access_token": {
"type": "apiKey",
"name": "Authorization",
"in": "header"
}
},
"info": {
"title": "POK9 API",
"description": "POK9 are provides User Profile, Following, Follower, and Upload Cover photo services. You can find more about [POK9 Documents](https://bitbucket.org/dotography-code/pok9/src/a2241595f474ce4a7df071428ccb9940128ca68a/docs?at=develop)",
"version": "1.0.0"
},
"produces": [
"application/json"
],
"swagger": "2.0",
"consumes": [
"application/json"
],
"host": "192.168.3.24:9123"
}