From 942a189258fd0b6b28e7cfab949a5ebed92a3ce4 Mon Sep 17 00:00:00 2001 From: Sergio Bilello Date: Mon, 11 Oct 2021 11:51:29 -0700 Subject: [PATCH] Fix for ENUM that works only by merging PR https://github.com/swagger-api/swagger-codegen-generators/pull/978 --- .../v3/service/GeneratorServiceTest.java | 27 + .../issue-11166/RequestCreateMeeting.yaml | 549 +++++++++++++++ .../issue-11166/ResponseCreateMeeting.yaml | 651 ++++++++++++++++++ .../3_0_0/issue-11166/issue-11166.yaml | 47 ++ 4 files changed, 1274 insertions(+) create mode 100644 modules/swagger-codegen/src/test/resources/3_0_0/issue-11166/RequestCreateMeeting.yaml create mode 100644 modules/swagger-codegen/src/test/resources/3_0_0/issue-11166/ResponseCreateMeeting.yaml create mode 100644 modules/swagger-codegen/src/test/resources/3_0_0/issue-11166/issue-11166.yaml diff --git a/modules/swagger-codegen/src/test/java/io/swagger/codegen/v3/service/GeneratorServiceTest.java b/modules/swagger-codegen/src/test/java/io/swagger/codegen/v3/service/GeneratorServiceTest.java index 5422f300f16..74fbcba70c9 100644 --- a/modules/swagger-codegen/src/test/java/io/swagger/codegen/v3/service/GeneratorServiceTest.java +++ b/modules/swagger-codegen/src/test/java/io/swagger/codegen/v3/service/GeneratorServiceTest.java @@ -210,6 +210,33 @@ public void testGeneratorService_notNullJacksonAnnotationJava_True() throws IOEx } } + @Test(description = "test generator service with java enum parameters in type") + public void testGeneratorService_WithEnumParametersType() throws IOException { + + String path = getTmpFolder().getAbsolutePath(); + GenerationRequest request = new GenerationRequest(); + request + .codegenVersion(GenerationRequest.CodegenVersion.V3) + .type(GenerationRequest.Type.CLIENT) + .lang("java") + .spec(loadSpecAsNode("3_0_0/issue-11166/issue-11166.yaml", true, false)) + .options( + new Options() + .outputDir(path) + ); + + List files = new GeneratorService().generationRequest(request).generate(); + Assert.assertFalse(files.isEmpty()); + for (File f: files) { + String relPath = f.getAbsolutePath().substring(path.length()); + if ("/src/main/java/io/swagger/client/model/ResponseCreateMeetingSettings.java".equals(relPath)) { + String fileContent = FileUtils.readFileToString(f); + Assert.assertTrue(fileContent.contains("public static ApprovalTypeEnum fromValue(Integer input)")); + Assert.assertTrue(fileContent.contains("b.value.equals(input)")); + } + } + } + @Test(description = "test generator service with java") public void testGeneratorService_notNullJacksonAnnotationJava_False() throws IOException { diff --git a/modules/swagger-codegen/src/test/resources/3_0_0/issue-11166/RequestCreateMeeting.yaml b/modules/swagger-codegen/src/test/resources/3_0_0/issue-11166/RequestCreateMeeting.yaml new file mode 100644 index 00000000000..f4cc38c6271 --- /dev/null +++ b/modules/swagger-codegen/src/test/resources/3_0_0/issue-11166/RequestCreateMeeting.yaml @@ -0,0 +1,549 @@ +type: object +description: The base meeting object. +properties: + topic: + type: string + description: The meeting's topic. + type: + type: integer + description: |- + The type of meeting: + * `1` — An instant meeting. + * `2` — A scheduled meeting. + * `3` — A recurring meeting with no fixed time. + * `8` — A recurring meeting with fixed time. + default: 2 + #### THIS CAUSES PROBLEM IN THE SERIALIZATION BECAUSE THE ENUMS VALUES ARE NUMBERS AND NOT STRINGS + enum: + - 1 + - 2 + - 3 + - 8 + x-enum-descriptions: + - Instant meeting. + - Scheduled meeting. + - Recurring meeting with no fixed time. + - Recurring meeting with fixed time. + pre_schedule: + type: boolean + default: false + description: >- + Whether to create a prescheduled meeting. This field only supports + schedule meetings (`2`): + + * `true` — Create a prescheduled meeting. + + * `false` — Create a regular meeting. + start_time: + type: string + format: date-time + description: >- + The meeting's start time. This field is only used for scheduled and/or + recurring meetings with a fixed time. This supports local time and GMT + formats. + + * To set a meeting's start time in GMT, use the `yyyy-MM-ddTHH:mm:ssZ` date-time format. For example, `2020-03-31T12:02:00Z`. + + duration: + type: integer + description: + The meeting's scheduled duration, in minutes. This field is only + used for scheduled meetings (`2`). + schedule_for: + type: string + description: The email address or user ID of the user to schedule a meeting for. + timezone: + type: string + description: >- + The timezome to assign to the `start_time` value. This field is only used + for scheduled meetings (`2`). + + + password: + type: string + description: >- + The password required to join the meeting. By default, a password can + **only** have a maximum length of 10 characters and only contain + alphanumeric characters and the `@`, `-`, `_`, and `*` characters. + + maxLength: 10 + agenda: + type: string + description: The meeting's agenda. This value has a maximum length of 2,000 characters. + maxLength: 2000 + tracking_fields: + type: array + description: Information about the meeting's tracking fields. + items: + type: object + required: + - field + properties: + field: + type: string + description: The tracking field's label. + value: + type: string + description: The tracking field's value. + recurrence: + type: object + description: + "Recurrence object. Use this object only for a meeting with type + `8` i.e., a recurring meeting with fixed time. " + required: + - type + properties: + type: + type: integer + description: + Recurrence meeting types:
`1` - Daily.
`2` - Weekly.
`3` - + Monthly. + enum: + - 1 + - 2 + - 3 + x-enum-descriptions: + - Daily + - Weekly + - Monthly + repeat_interval: + type: integer + description: >+ + Define the interval at which the meeting should recur. For instance, + if you would like to schedule a meeting that recurs every two months, + you must set the value of this field as `2` and the value of the + `type` parameter as `3`. + + + For a daily meeting, the maximum interval you can set is `90` days. For a weekly meeting the maximum interval that you can set is of `12` weeks. For a monthly meeting, there is a maximum of `3` months. + + weekly_days: + type: string + description: >- + This field is required **if you're scheduling a recurring meeting of + type** `2` to state which day(s) of the week the meeting should + repeat.

The value for this field could be a number between + `1` to `7` in string format. For instance, if the meeting should recur + on Sunday, provide `"1"` as the value of this field.

**Note:** + If you would like the meeting to occur on multiple days of a week, you + should provide comma separated values for this field. For instance, if + the meeting should recur on Sundays and Tuesdays provide `"1,3"` as + the value of this field. + +
`1` - Sunday.
`2` - Monday.
`3` - Tuesday.
`4` - Wednesday.
`5` - Thursday.
`6` - Friday.
`7` - Saturday. + enum: + - "1" + - "2" + - "3" + - "4" + - "5" + - "6" + - "7" + default: "1" + monthly_day: + type: integer + description: >- + Use this field **only if you're scheduling a recurring meeting of + type** `3` to state which day in a month, the meeting should recur. + The value range is from 1 to 31. + + + For instance, if you would like the meeting to recur on 23rd of each month, provide `23` as the value of this field and `1` as the value of the `repeat_interval` field. Instead, if you would like the meeting to recur every three months, on 23rd of the month, change the value of the `repeat_interval` field to `3`. + default: 1 + monthly_week: + type: integer + description: + Use this field **only if you're scheduling a recurring meeting of + type** `3` to state the week of the month when the meeting should + recur. If you use this field, **you must also use the + `monthly_week_day` field to state the day of the week when the meeting + should recur.**
`-1` - Last week of the month.
`1` - First week + of the month.
`2` - Second week of the month.
`3` - Third week + of the month.
`4` - Fourth week of the month. + enum: + - -1 + - 1 + - 2 + - 3 + - 4 + x-enum-descriptions: + - Last week + - First week + - Second week + - Third week + - Fourth week + monthly_week_day: + type: integer + description: >- + Use this field **only if you're scheduling a recurring meeting of + type** `3` to state a specific day in a week when the monthly meeting + should recur. To use this field, you must also use the `monthly_week` + field. + + +
`1` - Sunday.
`2` - Monday.
`3` - Tuesday.
`4` - Wednesday.
`5` - Thursday.
`6` - Friday.
`7` - Saturday. + enum: + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + x-enum-descriptions: + - Sunday + - Monday + - Tuesday + - Wednesday + - Thursday + - Friday + - Saturday + end_times: + type: integer + description: Select how many times the meeting should recur before it is + canceled. (Cannot be used with "end_date_time".) + default: 1 + maximum: 365 + end_date_time: + type: string + description: + Select the final date on which the meeting will recur before it is + canceled. Should be in UTC time, such as 2017-11-25T12:00:00Z. (Cannot + be used with "end_times".) + format: date-time + settings: + type: object + description: Information about the meeting's settings. + properties: + host_video: + type: boolean + description: Whether to start meetings with the host video on. + participant_video: + type: boolean + description: Whether to start meetings with the participant video on. + cn_meeting: + type: boolean + description: + Whether to host the meeting in China (CN). This value defaults to + `false`. + default: false + in_meeting: + type: boolean + description: + Whether to host the meeting in India (IN). This value defaults to + `false`. + default: false + join_before_host: + type: boolean + description: >- + Whether participants can join the meeting before its host. This field + is only used for scheduled meetings (`2`) or recurring meetings (`3` + and `8`). This value defaults to `false`. + + + default: false + jbh_time: + type: integer + description: >- + If the value of the `join_before_host` field is `true`, this field + indicates the time limits within which a participant can join a + meeting before the meeting's host: + + + * `0` — Allow the participant to join the meeting at anytime. + + * `5` — Allow the participant to join 5 minutes before the meeting's start time. + + * `10` — Allow the participant to join 10 minutes before the meeting's start time. + enum: + - 0 + - 5 + - 10 + mute_upon_entry: + type: boolean + description: Whether to mute participants upon entry. + default: false + watermark: + type: boolean + description: Whether to add a watermark when viewing a shared screen. + default: false + use_pmi: + type: boolean + description: Whether to use a [PMI (Personal Meeting ID)] + instead of a generated meeting ID. This field is only used for + scheduled meetings (`2`), instant meetings (`1`), or recurring + meetings with no fixed time (`3`). This value defaults to `false`. + default: false + approval_type: + type: integer + default: 2 + description: |- + Enable meeting registration approval: + * `0` — Automatically approve registration. + * `1` — Manually approve registration. + * `2` — No registration required. + + This value defaults to `2`. + enum: + - 0 + - 1 + - 2 + x-enum-descriptions: + - Automatically approve registration. + - Manually approve registration. + - No registration required. + registration_type: + type: integer + description: >- + The meeting's registration type: + + * `1` — Attendees register once and can attend any meeting occurrence. + + * `2` — Attendees must register for each meeting occurrence. + + * `3` — Attendees register once and can select one or more meeting occurrences to attend. + + + This field is only for recurring meetings with fixed times (`8`). This value defaults to `1`. + default: 1 + enum: + - 1 + - 2 + - 3 + x-enum-descriptions: + - Attendees register once and can attend any meeting occurrence. + - Attendees must register for each meeting occurrence. + - Attendees register once and can select one or more meeting + occurrences to attend. + audio: + type: string + description: |- + How participants join the audio portion of the meeting: + * `both` — Both telephony and VoIP. + * `telephony` — Telephony only. + * `voip` — VoIP only. + + This value defaults to `both`. + default: both + enum: + - both + - telephony + - voip + x-enum-descriptions: + - Telephony and VoIP. + - Telephony only. + - VoIP only. + auto_recording: + type: string + description: |- + The automatic recording settings: + * `local` — Record the meeting locally. + * `cloud` — Record the meeting to the cloud. + * `none` — Auto-recording disabled. + + This value defaults to `none`. + default: none + enum: + - local + - cloud + - none + x-enum-descriptions: + - Record the meeting locally. + - Record the meeting to the cloud. + - Auto-recording disabled. + alternative_hosts: + type: string + description: + The alternative hosts' email addresses or IDs. Comma-separate + multiple values. + close_registration: + type: boolean + description: + Whether to close registration after the event date. This value + defaults to `false`. + default: false + waiting_room: + type: boolean + description: Whether to enable the [**Waiting Room** feature] + If this value is `true`, this **disables** the `join_before_host` + setting. + global_dial_in_countries: + type: array + description: A list of available global dial-in countries. + items: + type: string + contact_name: + type: string + description: The contact name for meeting registration. + contact_email: + type: string + description: The contact email address for meeting registration. + registrants_email_notification: + type: boolean + description: >- + Whether to send registrants email notifications about their + registration approval, cancellation, or rejection: + + + * `true` — Send an email notification. + + * `false` — Do not send an email notification. + + Set this value to `true` to also use the `registrants_confirmation_email` parameter. + registrants_confirmation_email: + type: boolean + description: |- + Whether to send registrants an email confirmation: + * `true` — Send a confirmation email. + * `false` — Do not send a confirmation email. + meeting_authentication: + type: boolean + description: If true, only [authenticated] users can join the meeting. + authentication_option: + type: string + description: >- + If the `meeting_authentication` value is `true`, the type of + authentication required for users to join a meeting. + To get this value, use the `authentication_options` array's `id` value in the API response. + authentication_domains: + type: string + description: + The meeting's authenticated domains. Only users whose email + address contains an authenticated domain can join the meeting. + Comma-separate multiple domains or use a wildcard for listing domains. + authentication_exception: + type: array + description: + A list of participants that can bypass meeting authentication. + These participants will receive a unique meeting invite. + items: + type: object + properties: + name: + type: string + description: The participant's name. + email: + type: string + description: The participant's email address. + format: email + additional_data_center_regions: + description: >- + + To include "India" and "Japan" as additional data centers, use the `["IN", "TY"]` value for this field. + type: array + items: + type: string + breakout_room: + type: object + description: The [pre-assigned breakout rooms] + properties: + enable: + type: boolean + description: Whether to enable the [**Breakout Room **] + rooms: + type: array + description: Information about the breakout rooms. + items: + type: object + properties: + name: + type: string + description: The breakout room's name. + participants: + type: array + description: + The email addresses of the participants to assign to the breakout + room. + items: + type: string + language_interpretation: + type: object + description: >- + The meeting's seetings for language_interpretation + + This feature is only available for certain Webinar add-on, Education, Business and higher plans. If this feature is **not** enabled on the host's account, this setting will **not** be applied to the meeting. + properties: + enable: + type: boolean + description: Whether to enable [language interpretation] + interpreters: + type: array + description: Information about the meeting's interpreter. + items: + type: object + properties: + email: + type: string + description: The interpreter's email address. + format: email + languages: + type: string + description: + The available interpretation languages. This string **must** + contain at least two comma-separated + For example, if the interpretation is English to Chinese, + use the `"US,CN"` value. + show_share_button: + type: boolean + description: + Whether to include social media sharing butons on the meeting's + registration page. This setting is only applied to meetings with + registration enabled. + allow_multiple_devices: + type: boolean + description: + Whether to allow attendees to join a meeting from multiple devices. + This setting is only applied to meetings with registration enabled. + encryption_type: + type: string + description: >- + The type of [end-to-end (E2EE) encryption] + use for the meeting: + + * `enhanced_encryption` — Enhanced encryption. Encryption is stored in the cloud when you enable this option. + + * `e2ee` — End-to-end encryption. The encryption key is stored on your local device and **cannot** be obtained by anyone else. + enum: + - enhanced_encryption + - e2ee + approved_or_denied_countries_or_regions: + type: object + description: + The list of approved or blocked users from specific countries or + regions who can join the meeting. + properties: + enable: + type: boolean + description: + blank + method: + type: string + enum: + - approve + - deny + description: >- + Whether to allow or block users from specific countries or + regions: + + * `approve` — Allow users from specific countries or regions to join the meeting. If you select this setting, you must include the approved countries or regions in the `approved_list` field. + + * `deny` — Block users from specific countries or regions from joining the meeting. If you select this setting, you must include the blocked countries or regions in the `denied_list` field. + approved_list: + type: array + description: The list of approved countries or regions. + items: + type: string + denied_list: + type: array + description: The list of blocked countries or regions. + items: + type: string + alternative_hosts_email_notification: + type: boolean + description: + Whether to send email notifications to alternative hosts. This + value defaults to `true`. + default: true + template_id: + type: string + description: >- diff --git a/modules/swagger-codegen/src/test/resources/3_0_0/issue-11166/ResponseCreateMeeting.yaml b/modules/swagger-codegen/src/test/resources/3_0_0/issue-11166/ResponseCreateMeeting.yaml new file mode 100644 index 00000000000..11d84de554d --- /dev/null +++ b/modules/swagger-codegen/src/test/resources/3_0_0/issue-11166/ResponseCreateMeeting.yaml @@ -0,0 +1,651 @@ +type: object +description: Meeting object +properties: + id: + type: integer + description: '[Meeting + ID](https://support.zoom.us/hc/en-us/articles/201362373-What-is-a-Meeting-ID-): + Unique identifier of the meeting in "**long**" format(represented as int64 + data type in JSON), also known as the meeting number.' + format: int64 + assistant_id: + type: string + description: + Unique identifier of the scheduler who scheduled this meeting on + behalf of the host. This field is only returned if you used "schedule_for" + option in the [Create a Meeting API + request](https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetingcreate). + host_email: + type: string + description: Email address of the meeting host. + format: email + registration_url: + type: string + description: + URL using which registrants can register for a meeting. This field + is only returned for meetings that have enabled registration. + topic: + type: string + description: Meeting topic + maxLength: 200 + type: + type: integer + description: Meeting Type + default: 2 + enum: + - 1 + - 2 + - 3 + - 8 + x-enum-descriptions: + - Instant Meeting + - Scheduled Meeting + - Recurring Meeting with no fixed time + - Recurring Meeting with fixed time + pre_schedule: + type: boolean + default: false + description: >- + Whether to create a prescheduled meeting. This **only** supports the + meeting `type` value of `2` (Scheduled Meeting): + + * `true` — Create a prescheduled meeting. + + * `false` — Create a regular meeting. + start_time: + type: string + format: date-time + description: 'Meeting start date-time in UTC/GMT. Example: "2020-03-31T12:02:00Z"' + duration: + type: integer + description: Meeting duration. + timezone: + type: string + description: Timezone to format start_time + created_at: + type: string + format: date-time + description: The date and time at which this meeting was created. + agenda: + type: string + description: Agenda + start_url: + type: string + description: + URL to start the meeting. This URL should only be used by the host + of the meeting and **should not be shared with anyone other than the + host** of the meeting as anyone with this URL will be able to login to the + Zoom Client as the host of the meeting. + join_url: + type: string + description: + URL for participants to join the meeting. This URL should only be + shared with users that you would like to invite for the meeting. + password: + type: string + description: >+ + Meeting password. Password may only contain the following characters: + `[a-z A-Z 0-9 @ - _ * !]` + + + If "Require a password when scheduling new meetings" setting has been **enabled** **and** [locked](https://support.zoom.us/hc/en-us/articles/115005269866-Using-Tiered-Settings#locked) for the user, the password field will be autogenerated in the response even if it is not provided in the API request. + + + h323_password: + type: string + description: H.323/SIP room system password + pmi: + type: integer + description: + Personal Meeting Id. Only used for scheduled meetings and recurring + meetings with no fixed time. + format: int64 + tracking_fields: + type: array + description: Tracking fields + items: + type: object + properties: + field: + type: string + description: Label of the tracking field. + value: + type: string + description: Value for the field. + visible: + type: boolean + description: >- + Indicates whether the [tracking + field](https://support.zoom.us/hc/en-us/articles/115000293426-Scheduling-Tracking-Fields) + is visible in the meeting scheduling options in the Zoom Web Portal + or not. + + + `true`: Tracking field is visible.
+ + + `false`: Tracking field is not visible to the users in the meeting options in the Zoom Web Portal but the field was used while scheduling this meeting via API. An invisible tracking field can be used by users while scheduling meetings via API only. + occurrences: + type: array + description: Array of occurrence objects. + items: + type: object + description: Occurence object. This object is only returned for Recurring Webinars. + properties: + occurrence_id: + type: string + description: + "Occurrence ID: Unique Identifier that identifies an occurrence of + a recurring webinar. [Recurring + webinars](https://support.zoom.us/hc/en-us/articles/216354763-How-t\ + o-Schedule-A-Recurring-Webinar) can have a maximum of 50 + occurrences." + start_time: + type: string + format: date-time + description: Start time. + duration: + type: integer + description: Duration. + status: + type: string + description: Occurrence status. + settings: + type: object + description: Meeting settings. + properties: + host_video: + type: boolean + description: Start video when the host joins the meeting. + participant_video: + type: boolean + description: Start video when participants join the meeting. + cn_meeting: + type: boolean + description: Host meeting in China. + default: false + in_meeting: + type: boolean + description: Host meeting in India. + default: false + join_before_host: + type: boolean + description: + Allow participants to join the meeting before the host starts the + meeting. Only used for scheduled or recurring meetings. + default: false + jbh_time: + type: integer + description: >- + If the value of "join_before_host" field is set to true, this field + can be used to indicate time limits within which a participant may + join a meeting before a host. The value of this field can be one of + the following: + + + * `0`: Allow participant to join anytime. + + * `5`: Allow participant to join 5 minutes before meeting start time. + * `10`: Allow participant to join 10 minutes before meeting start time. + enum: + - 0 + - 5 + - 10 + mute_upon_entry: + type: boolean + description: Mute participants upon entry. + default: false + watermark: + type: boolean + description: Add watermark when viewing a shared screen. + default: false + use_pmi: + type: boolean + description: + Use a personal meeting ID. Only used for scheduled meetings and + recurring meetings with no fixed time. + default: false + approval_type: + type: integer + default: 2 + description: >- + Enable registration and set approval for the registration. Note that + this feature requires the host to be of **Licensed** user type. + **Registration cannot be enabled for a basic user.**

+ + + `0` - Automatically approve.
`1` - Manually approve.
`2` - No registration required. + enum: + - 0 + - 1 + - 2 + x-enum-descriptions: + - Automatically Approve + - Manually Approve + - No Registration Required + registration_type: + type: integer + description: + Registration type. Used for recurring meeting with fixed time only. +
`1` Attendees register once and can attend any of the + occurrences.
`2` Attendees need to register for each occurrence to + attend.
`3` Attendees register once and can choose one or more + occurrences to attend. + default: 1 + enum: + - 1 + - 2 + - 3 + x-enum-descriptions: + - Attendees register once and can attend any of the occurrences + - Attendees need to register for each occurrence to attend + - Attendees register once and can choose one or more occurrences to + attend + audio: + type: string + description: + Determine how participants can join the audio portion of the + meeting.
`both` - Both Telephony and VoIP.
`telephony` - + Telephony only.
`voip` - VoIP only. + default: both + enum: + - both + - telephony + - voip + x-enum-descriptions: + - Both Telephony and VoIP + - Telephony only + - VoIP only + auto_recording: + type: string + description: + Automatic recording:
`local` - Record on local.
`cloud` + - Record on cloud.
`none` - Disabled. + default: none + enum: + - local + - cloud + - none + x-enum-descriptions: + - Record to local device + - Record to cloud + - No Recording + enforce_login: + type: boolean + description: >- + Only signed in users can join this meeting. + + + **This field is deprecated and will not be supported in the future.**

As an alternative, use the "meeting_authentication", "authentication_option" and "authentication_domains" fields to understand the [authentication configurations](https://support.zoom.us/hc/en-us/articles/360037117472-Authentication-Profiles-for-Meetings-and-Webinars) set for the meeting. + enforce_login_domains: + type: string + description: >- + Only signed in users with specified domains can join meetings. + + + **This field is deprecated and will not be supported in the future.**

As an alternative, use the "meeting_authentication", "authentication_option" and "authentication_domains" fields to understand the [authentication configurations](https://support.zoom.us/hc/en-us/articles/360037117472-Authentication-Profiles-for-Meetings-and-Webinars) set for the meeting. + alternative_hosts: + type: string + description: + "Alternative host's emails or IDs: multiple values are separated by + a semicolon." + close_registration: + type: boolean + description: Close registration after event date + default: false + waiting_room: + type: boolean + description: Enable waiting room + default: false + global_dial_in_countries: + type: array + description: List of global dial-in countries + items: + type: string + global_dial_in_numbers: + type: array + description: Global Dial-in Countries/Regions + items: + type: object + properties: + country: + type: string + description: Country code. For example, BR. + country_name: + type: string + description: Full name of country. For example, Brazil. + city: + type: string + description: City of the number, if any. For example, Chicago. + number: + type: string + description: Phone number. For example, +1 2332357613. + type: + type: string + description: "Type of number. " + enum: + - toll + - tollfree + contact_name: + type: string + description: Contact name for registration + contact_email: + type: string + description: Contact email for registration + registrants_email_notification: + type: boolean + description: >- + Whether to send registrants email notifications about their + registration approval, cancellation, or rejection: + + + * `true` — Send an email notification. + + * `false` — Do not send an email notification. + + Set this value to `true` to also use the `registrants_confirmation_email` parameter. + registrants_confirmation_email: + type: boolean + description: |- + Whether to send registrants an email confirmation: + * `true` — Send a confirmation email. + * `false` — Do not send a confirmation email. + meeting_authentication: + type: boolean + description: "`true`- Only authenticated users can join meetings." + authentication_option: + type: string + description: Meeting authentication option id. + authentication_domains: + type: string + description: If user has configured ["Sign Into Zoom with Specified + Domains"](https://support.zoom.us/hc/en-us/articles/360037117472-Authentication-Profiles-for-Meetings-and-Webinars#h_5c0df2e1-cfd2-469f-bb4a-c77d7c0cca6f) + option, this will list the domains that are authenticated. + authentication_name: + type: string + description: Authentication name set in the [authentication + profile](https://support.zoom.us/hc/en-us/articles/360037117472-Authentication-Profiles-for-Meetings-and-Webinars#h_5c0df2e1-cfd2-469f-bb4a-c77d7c0cca6f). + show_share_button: + type: boolean + description: >- + Show social share buttons on the meeting registration page. + + This setting only works for meetings that require [registration](https://support.zoom.us/hc/en-us/articles/211579443-Setting-up-registration-for-a-meeting). + allow_multiple_devices: + type: boolean + description: + Allow attendees to join the meeting from multiple devices. This + setting only works for meetings that require + [registration](https://support.zoom.us/hc/en-us/articles/211579443-Setting-up-registration-for-a-meeting). + encryption_type: + type: string + description: >- + Choose between enhanced encryption and [end-to-end + encryption](https://support.zoom.us/hc/en-us/articles/360048660871) + when starting or a meeting. When using end-to-end encryption, several + features (e.g. cloud recording, phone/SIP/H.323 dial-in) will be + **automatically disabled**.

The value of this field can be one + of the following:
+ + `enhanced_encryption`: Enhanced encryption. Encryption is stored in the cloud if you enable this option.
+ + + `e2ee`: [End-to-end encryption](https://support.zoom.us/hc/en-us/articles/360048660871). The encryption key is stored in your local device and can not be obtained by anyone else. Enabling this setting also **disables** the following features: join before host, cloud recording, streaming, live transcription, breakout rooms, polling, 1:1 private chat, and meeting reactions. + enum: + - enhanced_encryption + - e2ee + approved_or_denied_countries_or_regions: + type: object + description: > + Approve or block users from specific regions/countries from joining + this meeting. + properties: + enable: + type: boolean + description: >- + `true`: Setting enabled to either allow users or block users from + specific regions to join your meetings.
+ + + `false`: Setting disabled. + method: + type: string + enum: + - approve + - deny + description: >- + Specify whether to allow users from specific regions to join this + meeting; or block users from specific regions from joining this + meeting.

+ + `approve`: Allow users from specific regions/countries to join this meeting. If this setting is selected, the approved regions/countries must be included in the `approved_list`.

+ + `deny`: Block users from specific regions/countries from joining this meeting. If this setting is selected, the approved regions/countries must be included in the `denied_list` + approved_list: + type: array + description: + "List of countries/regions from where participants can join this + meeting. " + items: + type: string + denied_list: + type: array + description: + "List of countries/regions from where participants can not join + this meeting. " + items: + type: string + authentication_exception: + type: array + description: + The participants added here will receive unique meeting invite + links and bypass authentication. + items: + type: object + properties: + name: + type: string + description: Name of the participant. + email: + type: string + description: Email address of the participant. + format: email + breakout_room: + type: object + description: Setting to [pre-assign breakout + rooms](https://support.zoom.us/hc/en-us/articles/360032752671-Pre-assigning-participants-to-breakout-rooms#h_36f71353-4190-48a2-b999-ca129861c1f4). + properties: + enable: + type: boolean + description: + Set the value of this field to `true` if you would like to enable + the [breakout room + pre-assign](https://support.zoom.us/hc/en-us/articles/360032752671-Pre-assigning-participants-to-breakout-rooms#h_36f71353-4190-48a2-b999-ca129861c1f4) + option. + rooms: + type: array + description: Create room(s). + items: + type: object + properties: + name: + type: string + description: Name of the breakout room. + participants: + type: array + description: + Email addresses of the participants who are to be assigned to the + breakout room. + items: + type: string + language_interpretation: + type: object + properties: + enable: + type: boolean + interpreters: + type: array + description: Information associated with the interpreter. + items: + type: object + properties: + email: + type: string + description: Email address of the interpreter. + format: email + languages: + type: string + description: >- + Languages for interpretation. The string must contain two + [country + Ids](https://marketplace.zoom.us/docs/api-reference/other-references/abbreviation-lists#countries) + separated by a comma. + + + For example, if the language is to be interpreted from English to Chinese, the value of this field should be "US,CN". + custom_keys: + type: array + maxItems: 10 + description: Custom keys and values assigned to the meeting. + items: + type: object + properties: + key: + type: string + description: Custom key associated with the user. + maxLength: 64 + value: + type: string + description: Value of the custom key associated with the user. + maxLength: 256 + alternative_hosts_email_notification: + type: boolean + description: Flag to determine whether to send email notifications to + alternative hosts, default value is true. + default: true + recurrence: + type: object + description: + "Recurrence object. Use this object only for a meeting with type + `8` i.e., a recurring meeting with fixed time. " + required: + - type + properties: + type: + type: integer + description: + Recurrence meeting types:
`1` - Daily.
`2` - Weekly.
`3` - + Monthly. + enum: + - 1 + - 2 + - 3 + x-enum-descriptions: + - Daily + - Weekly + - Monthly + repeat_interval: + type: integer + description: >+ + Define the interval at which the meeting should recur. For instance, + if you would like to schedule a meeting that recurs every two months, + you must set the value of this field as `2` and the value of the + `type` parameter as `3`. + + + For a daily meeting, the maximum interval you can set is `90` days. For a weekly meeting the maximum interval that you can set is of `12` weeks. For a monthly meeting, there is a maximum of `3` months. + + weekly_days: + type: string + description: >- + This field is required **if you're scheduling a recurring meeting of + type** `2` to state which day(s) of the week the meeting should + repeat.

The value for this field could be a number between + `1` to `7` in string format. For instance, if the meeting should recur + on Sunday, provide `"1"` as the value of this field.

**Note:** + If you would like the meeting to occur on multiple days of a week, you + should provide comma separated values for this field. For instance, if + the meeting should recur on Sundays and Tuesdays provide `"1,3"` as + the value of this field. + +
`1` - Sunday.
`2` - Monday.
`3` - Tuesday.
`4` - Wednesday.
`5` - Thursday.
`6` - Friday.
`7` - Saturday. + enum: + - "1" + - "2" + - "3" + - "4" + - "5" + - "6" + - "7" + default: "1" + monthly_day: + type: integer + description: >- + Use this field **only if you're scheduling a recurring meeting of + type** `3` to state which day in a month, the meeting should recur. + The value range is from 1 to 31. + + + For instance, if you would like the meeting to recur on 23rd of each month, provide `23` as the value of this field and `1` as the value of the `repeat_interval` field. Instead, if you would like the meeting to recur every three months, on 23rd of the month, change the value of the `repeat_interval` field to `3`. + default: 1 + monthly_week: + type: integer + description: + Use this field **only if you're scheduling a recurring meeting of + type** `3` to state the week of the month when the meeting should + recur. If you use this field, **you must also use the + `monthly_week_day` field to state the day of the week when the meeting + should recur.**
`-1` - Last week of the month.
`1` - First week + of the month.
`2` - Second week of the month.
`3` - Third week + of the month.
`4` - Fourth week of the month. + enum: + - -1 + - 1 + - 2 + - 3 + - 4 + x-enum-descriptions: + - Last week + - First week + - Second week + - Third week + - Fourth week + monthly_week_day: + type: integer + description: >- + Use this field **only if you're scheduling a recurring meeting of + type** `3` to state a specific day in a week when the monthly meeting + should recur. To use this field, you must also use the `monthly_week` + field. + + +
`1` - Sunday.
`2` - Monday.
`3` - Tuesday.
`4` - Wednesday.
`5` - Thursday.
`6` - Friday.
`7` - Saturday. + enum: + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + x-enum-descriptions: + - Sunday + - Monday + - Tuesday + - Wednesday + - Thursday + - Friday + - Saturday + end_times: + type: integer + description: Select how many times the meeting should recur before it is + canceled. (Cannot be used with "end_date_time".) + default: 1 + maximum: 365 + end_date_time: + type: string + description: + Select the final date on which the meeting will recur before it is + canceled. Should be in UTC time, such as 2017-11-25T12:00:00Z. (Cannot + be used with "end_times".) + format: date-time diff --git a/modules/swagger-codegen/src/test/resources/3_0_0/issue-11166/issue-11166.yaml b/modules/swagger-codegen/src/test/resources/3_0_0/issue-11166/issue-11166.yaml new file mode 100644 index 00000000000..a4cb18f7a68 --- /dev/null +++ b/modules/swagger-codegen/src/test/resources/3_0_0/issue-11166/issue-11166.yaml @@ -0,0 +1,47 @@ +openapi: 3.0.1 +info: + contact: + email: sergio.bilello@gmail.com + title: meetings + description: meetings API + version: 1.0.0 +servers: + - url: 'https://test.us' +components: + securitySchemes: + bearerAuth: + name: Authorization + type: apiKey + in: header +paths: + '/v2/users/{userId}/meetings': + post: + tags: + - createMeeting + parameters: + - schema: + type: string + name: userId + in: path + required: true + description: Id of an existing user. + operationId: createMeeting + description: Create Meeting + summary: MeetingTimeFrame + requestBody: + content: + application/json: + schema: + $ref: '3_0_0/issue-11166/RequestCreateMeeting.yaml' + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '3_0_0/issue-11166/ResponseCreateMeeting.yaml' +tags: + - name: createMeeting + description: Create Meeting +security: + - bearerAuth: []