Hello all,
I got “Error while importing:format not recongnized” error when I wanted to import my swagger json to postman
My step:
export swagger json file → import (postman) → upload files → error
I didn’t find the answer of my problem in the other topics, I didn’t find any clue using google also, so I just suspect maybe there are some error format in my json file. can some one look this issue and give me some help, grateful thanks :)
other try:
I edit json file “swagger”: “2.0” to “openapi”: “2.0” but it didnot work neither
here are my json I used
{
"swagger": "2.0",
"paths": {
"/actuator/health": {
"get": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"actuator"
],
"summary": "get all services",
"operationId": "CheckHeath",
"parameters": [{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/actuator.CheckHealthReq"
}
}],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/actuator.HealthRsp"
}
}
}
}
},
"/api/v1/approval/service/{id}/start": {
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"approval"
],
"summary": "submit start service approval application",
"operationId": "SubmitStartApprovalApplication",
"parameters": [{
"type": "string",
"description": "application id",
"name": "id",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/serving.StartServiceApplication"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/serving.StartServiceApplication"
}
}
}
}
}
}
}
````json