Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Media content-type header is not being generated for input file types. #1286

Open
timayabi2020 opened this issue Dec 5, 2023 · 3 comments
Open
Labels

Comments

@timayabi2020
Copy link
Contributor

The defined media type content description for an api path are not picked, instead the API treats the request as an application/octet-stream for all input file types.
image

image

To reproduce the issue:

  1. Run autorest against the config file below autorest --title:"Identity.DirectoryManagement" config.yml --verbose
powershell: true
version: latest
use: '@autorest/[email protected]' #Replace with '@autorest/[email protected]' for autorest v2
export-properties-for-dict: false
subject-prefix: '-Mg'
azure: false
input-file: "https://raw.githubusercontent.com/timayabi2020/AutorestFiles/main/directorymanagement.yaml"
output-folder: src\$(title)
clear-output-folder: true
use-internal-constructors: true
use-datetimeoffset : true
metadata:
    authors: Microsoft Corporation
    owners: Microsoft Corporation
    companyName: Microsoft Corporation
    description: 'Microsoft Graph PowerShell Cmdlets'
    copyright: © Microsoft Corporation. All rights reserved.
    tags: Microsoft Office365 Graph PowerShell PSModule PSIncludes_Cmdlet
    requireLicenseAcceptance: true
    licenseUri: https://aka.ms/devservicesagreement
    projectUri: https://github.com/microsoftgraph/msgraph-sdk-powershell
    iconUri: https://raw.githubusercontent.com/microsoftgraph/g-raph/master/g-raph.png
directive:
  - no-inline:
    - MicrosoftGraphSharepointIds
    - MicrosoftGraphIdentitySet
    - MicrosoftGraphItemReference
    - MicrosoftGraphDirectoryObject
    - MicrosoftGraphUser
    - MicrosoftGraphDrive
    - MicrosoftGraphListItem
    - MicrosoftGraphPost
    - MicrosoftGraphSectionGroup
    - MicrosoftGraphTeam
    - MicrosoftGraphRecipient
    - MicrosoftGraphGroupPolicyCategory
    - MicrosoftGraphPrinter
    - MicrosoftGraphPrinterShare
    - MicrosoftGraphGovernanceResource
    - MicrosoftGraphGovernanceRoleAssignment
    - MicrosoftGraphGovernanceRoleDefinition
    - MicrosoftGraphWorkbookOperationError
    - MicrosoftGraphParentLabelDetails
    - MicrosoftGraphEdiscoveryTag
    - MicrosoftGraphEdiscoverySourceCollection
    - MicrosoftGraphContentType
    - MicrosoftGraphColumnDefinition
    - MicrosoftGraphGroupPolicyDefinition
    - MicrosoftGraphGroupPolicyDefinitionValue
    - MicrosoftGraphSynchronizationLinkedObjects
    - MicrosoftGraphSecuritySecurity
    - MicrosoftGraphTeamSummary
    - MicrosoftGraphSecurityInformationProtection
    - MicrosoftGraphSecurityInformationProtectionPolicySetting
    - MicrosoftGraphSecuritySensitivityLabel
    - MicrosoftGraphTaskViewpoint
    - MicrosoftGraphSecurityEdiscoveryReviewTag
    - MicrosoftGraphSecurityEdiscoverySearch
    - MicrosoftGraphManagedTenantsManagementTemplateStep
    - MicrosoftGraphPlannerTaskCreation
    - MicrosoftGraphPlannerTeamsPublicationInfo
  1. Go to Identity.DirectoryManagement.cs file under "generated\api" folder. request.Content has been set to null.
image
@dolauli
Copy link
Contributor

dolauli commented Dec 7, 2023

@timayabi2020 Would you please post a link to config.yml?

@isra-fel isra-fel added the bug label Dec 7, 2023
@isra-fel
Copy link
Member

isra-fel commented Dec 7, 2023

@timayabi2020
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants