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

Additonal Namespaces for generated Types #80

Merged
merged 4 commits into from
Jun 21, 2023

Conversation

angelofb
Copy link
Contributor

refitter ./openapi.json --additional-namespace "Your.Additional.Namespace" --additional-namespace "Your.Other.Additional.Namespace"

generates


using Refit;
using System.Collections.Generic;
using System.Text.Json.Serialization;
using System.Threading.Tasks;

using Your.Additional.Namespace;
using Your.Other.Additional.Namespace;

namespace GeneratedCode
{
//...
}

@christianhelle
Copy link
Owner

@angelofb thanks for this contribution! The changes look good to me.

I'm curious, what is the use case for this? I think all the required namespaces are already imported in the generated file, or was there something specific that was missing?

@christianhelle christianhelle added the enhancement New feature, bug fix, or request label Jun 21, 2023
@christianhelle christianhelle self-assigned this Jun 21, 2023
@christianhelle christianhelle merged commit e9aa469 into christianhelle:main Jun 21, 2023
@angelofb
Copy link
Contributor Author

if i don't generate the models with the option "--interface-only" then I need to specify where the models are defined

--interface-only Don't generate contract types

@christianhelle
Copy link
Owner

if i don't generate the models with the option "--interface-only" then I need to specify where the models are defined

--interface-only Don't generate contract types

Ok. That makes sense.

Thanks again!

@angelofb
Copy link
Contributor Author

Thank you!

@christianhelle
Copy link
Owner

The changes here are now published to nuget.org and released as v0.6.2

@angelofb
Copy link
Contributor Author

nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature, bug fix, or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants