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

Feature/http language support #5778

Open
wants to merge 83 commits into
base: main
Choose a base branch
from
Open

Conversation

koros
Copy link
Contributor

@koros koros commented Nov 14, 2024

Add support for HTTP snippet generation as a language option.

Closes #5761 #5546 #5568 #5543

koros added 30 commits October 9, 2024 16:10
@Onokaev Onokaev marked this pull request as ready for review January 17, 2025 09:16
src/Kiota.Builder/Constants.cs Outdated Show resolved Hide resolved
src/Kiota.Builder/KiotaBuilder.cs Show resolved Hide resolved
src/Kiota.Builder/KiotaBuilder.cs Outdated Show resolved Hide resolved
src/Kiota.Builder/Settings/SettingsFile.cs Outdated Show resolved Hide resolved
var pathParameters = requestBuilderClass
.GetChildElements(true)
.OfType<CodeProperty>()
.Where(property => property.IsOfKind(CodePropertyKind.PathParameters) && !property.Name.Equals("pathParameters", StringComparison.OrdinalIgnoreCase))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then use a constant reference instead please

namespace Kiota.Builder.Writers.Http;
public class CodePropertyWriter(HttpConventionService conventionService) : BaseElementWriter<CodeProperty, HttpConventionService>(conventionService)
{
public override void WriteCodeElement(CodeProperty codeElement, LanguageWriter writer)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we at least make a generic NO-OP writer, that we could reuse, to avoid the duplication?

Evans Aboge (from Dev Box) added 2 commits January 20, 2025 21:36
- Use TryGet to avoid reference resolution errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress 🚧
Development

Successfully merging this pull request may close these issues.

[Tracking Issue] Add HTTP Snippets Generation
5 participants