cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MDC
Regular Visitor

parameter value missing

Hi,

i created a swagger json file. see below for the swagger yaml file.

i then went to the powerapps online interface & created a custom API. Then a connection using the custom api that i just created. 

everything goes fine. but after a min, my connection shows "parameter value missing".

any ideas?

 

# as a demonstration of an API spec in YAML
swagger: '2.0'
info:
title: CheckPA
description: Checking some API
version: "1.0.0"
# the domain of the service
host: xyz.abc.org
# array of all schemes that your API supports
schemes:
- https
# will be prefixed to all paths
basePath: /External/service/v1
produces:
- application/json
paths:
/List/der/yub?listFields=email:
get:
summary: some reg list
description: some desc
operationId: getList

responses:
200:
description: OK. A list
400:
description: weird
parameters: []

securityDefinitions:
usersecurity:
type: basic

4 REPLIES 4
Meneghino
Community Champion
Community Champion

Hi @MDC

Please see below for a working JSON file (fetches ECB currency exchange rates).

Indeed I have defined the parameters in the middle of the definition, and the query is not included in the path definition.

Hope this helps.

 

{
  "swagger": "2.0",
  "info": {
    "version": "1.0.0",
    "title": "Fixer"
  },
  "host": "api.fixer.io",
  "paths": {
    "/{FXdate}": {
      "get": {
        "description": "Fetches historical FX rates from fixer.io",
        "operationId": "Run",
        "parameters": [
          {
            "name": "FXdate",
            "in": "path",
            "required": true,
            "description": "FX date in yyyy-mm-dd format",
            "type": "string"
          },
          {
            "name": "base",
            "in": "query",
            "required": true,
            "description": "ISO symbol of base currency",
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "schema": {
              "title": "The response of the api.",
              "type": "object",
              "properties":{
                "base":{
                  "type": "string"
                },
                "date":{
                  "type": "string"
                },
                "rates":{
                  "type": "object",
                  "properties":{
                    "USD":{
                      "type": "number",
                      "format": "double"
                    },
                    "EUR":{
                      "type": "number",
                      "format": "double"
                    },
                    "GBP":{
                      "type": "number",
                      "format": "double"
                    },
                    "RUB":{
                      "type": "number",
                      "format": "double"
                    },
                    "CHF":{
                      "type": "number",
                      "format": "double"
                    },
                    "BRL":{
                      "type": "number",
                      "format": "double"
                    },
                    "CZK":{
                      "type": "number",
                      "format": "double"
                    },
                    "HKD":{
                      "type": "number",
                      "format": "double"
                    },
                    "SGD":{
                      "type": "number",
                      "format": "double"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
MDC
Regular Visitor

Hi Meneghino,

Thanks for the reply. 

i have tried to define the swagger file like you have i.e. in the parameters section i defined the path & query parameters but i still have the same issue.

 

 

Meneghino
Community Champion
Community Champion

OK, sorry I couldn't help.

v-micsh-msft
Community Support
Community Support

Hi @MDC,

 

How you created this swagger file?

Please take a look at the get help with swagger file in the article below:

https://powerapps.microsoft.com/en-us/tutorials/register-custom-api/

For Swagger specification for the parameter object, see:

https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#parameter-object

Further, for web API, take a try to generate the swagger under Visual Studio.

See if the blog would help:

Guest Blog:Build Custom API on Microsoft Flow and PowerApps with Authentication

Regards

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (7,737)