# \[Issue\] Zoom Meeting API - OpenAPI Specification code generation

**URL:** <https://devforum.zoom.us/t/issue-zoom-meeting-api-openapi-specification-code-generation/82231>\
**Category:** Meetings\
**Tags:** api\
**Created:** [January 27, 2023, 11:41am UTC](https://devforum.zoom.us/t/issue-zoom-meeting-api-openapi-specification-code-generation/82231 "2023-01-27T11:41:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![geodask](https://avatars.discourse-cdn.com/v4/letter/g/e274bd/32.png) [@geodask](https://devforum.zoom.us/u/geodask)\
**Post date:** [January 27, 2023, 11:41am UTC](https://devforum.zoom.us/t/issue-zoom-meeting-api-openapi-specification-code-generation/82231/1 "2023-01-27T11:41:48Z")

</div>

Hello guys,

I have a few question regarding the open api specification for the Zoom Meetings API. I would like to build a node application with typescript that will use the Zoom Meetings API. I used this library: `openapi-typescript-codegen` to generate the typescript services with this command: `npx openapi --input ./ZoomMeetingAPIspec.json --output ./zoom-api`, where `ZoomMeetingAPIspec.json` is the file I download for the meeting api.

The generation is successful but the typescript code has some issues in the types that are generated. For example:

```typescript
public static reportTelephone(
        from: string,
        to: string,
        type: 1 | 3 = '1',
        queryDateType: 'start_time' | 'end_time' | 'meeting_start_time' | 'meeting_end_time' = 'start_time',
        pageSize: number = 30,
        pageNumber: number = 1,
        nextPageToken?: string,
    ): CancelablePromise<{
...

```

You see the type argument has a 1 | 3 union type but the default value is string ‘1’

This is the `reportTelephone` function in the `ResponseService.ts`. I have concluded that this is happening because the open api specifications has this definition for the reportTelephone endpoint like this:

```json
 "/report/telephone": {
      "get": {
        "parameters": [
          {
            "description": "Audio types:<br>`1` - Toll-free Call-in & Call-out.<br>`2` - Toll <br>\n`3` - SIP Connected Audio",
            "in": "query",
            "name": "type",
            "schema": { "default": "1", "enum": [1, 3], "type": "string", "example": "33" },
            "x-enum-descriptions": ["Toll-free Call-in & Call-out"]
          },
...

```

The schema for the `type` parameter defines it an enum: [1, 3] of two integers, and then the default values is set as string “1”.

Any advice on what to do? In my opinion the specification file needs correction. But maybe there is workaround?

---

<div class="post-metadata">

**Author:** ![geodask](https://avatars.discourse-cdn.com/v4/letter/g/e274bd/32.png) [@geodask](https://devforum.zoom.us/u/geodask)\
**Post date:** [January 30, 2023, 9:32am UTC](https://devforum.zoom.us/t/issue-zoom-meeting-api-openapi-specification-code-generation/82231/3 "2023-01-30T09:32:24Z")

</div>

I would like to receive a response to that. The Open API specification has issues!

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [January 30, 2023, 4:12pm UTC](https://devforum.zoom.us/t/issue-zoom-meeting-api-openapi-specification-code-generation/82231/4 "2023-01-30T16:12:40Z")

</div>

Hi @geodask  
Thanks for reaching out to the Zoom Developer Forum and for bringing this up to us,  
Let me take a look into this issue and do some testing on my end.  
I will come back to you shortly  
Best,  
Elisa

---

<div class="post-metadata">

**Author:** ![enrique](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/enrique/32/50080_2.png) [@enrique](https://devforum.zoom.us/u/enrique)\
**Post date:** [July 26, 2023, 6:16pm UTC](https://devforum.zoom.us/t/issue-zoom-meeting-api-openapi-specification-code-generation/82231/5 "2023-07-26T18:16:31Z")

</div>

Hi Elisa,  
Does the API specification still have issues?

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [August 8, 2023, 7:33pm UTC](https://devforum.zoom.us/t/issue-zoom-meeting-api-openapi-specification-code-generation/82231/6 "2023-08-08T19:33:32Z")

</div>

Hi @enrique  
Sorry for the late reply here and not resolving this issue.  
Let me look internally and will come back to you

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [August 15, 2023, 6:05pm UTC](https://devforum.zoom.us/t/issue-zoom-meeting-api-openapi-specification-code-generation/82231/7 "2023-08-15T18:05:28Z")

</div>

Hi @enrique  
Thanks for your patience here.  
I just reviewed our [Zoom Meeting API Spec](https://developers.zoom.us/docs/api/rest/reference/zoom-api/methods/#overview) and it is correct, here is the date from the reports/telephone:

```auto
"/report/telephone" \: {
    "get": {
       "parameters": [
             {
               "name":"type",
               "in":"query",
               "description":"Audio types: \n `1` - Toll-free Call-in &amp; Call-out. \n `2` - Toll \n \n`3` - SIP Connected Audio",
                "required":false,
                "explode":true,
                 "schema":{"type":"string","example":"33","default":"1","enum":["1","2","3"]}
             } 
]
}

```

Hope this helps clarify this issue
