Code Monkey home page Code Monkey logo

Comments (18)

Burgyn avatar Burgyn commented on June 10, 2024 1

I released new version. New version will be availabe in few minutes in https://www.nuget.org/packages/MMLib.SwaggerForOcelot/1.3.0

Thanks a lot

from mmlib.swaggerforocelot.

rkoczen avatar rkoczen commented on June 10, 2024

Hi The problem is here:

If we assign here options.EndPointBasePath in method UseSwaggerForOcelot like this "/swagger/docs"

and we use basePath in AddSwaggerEndPoints from config EndPointBasePath like "/gateway/swagger/docs"

everything works completly fine.

You can accesS both swagger documentation.

Is it possible to add additional endpoint for mapping ?

private static void UseSwaggerForOcelot(IApplicationBuilder app, SwaggerForOcelotUIOptions options)
=> app.Map(options.EndPointBasePath, builder => builder.UseMiddleware(options));

    private static void AddSwaggerEndPoints(SwaggerUIOptions c, IEnumerable<SwaggerEndPointOptions> endPoints, string basePath)
    {
        foreach (var endPoint in endPoints)
        {
            foreach (var config in endPoint.Config)
            {
                c.SwaggerEndpoint($"{basePath}/{config.Version}/{endPoint.KeyToPath}", $"{config.Name} - {config.Version}");
            }     
        }
    }

from mmlib.swaggerforocelot.

Burgyn avatar Burgyn commented on June 10, 2024

Hi,
thank you for reporting the problem and for research.
Can you provide an example of how you would like to use it?

Or ideal make PR if you know how to implement it. (Contribution is open ☺️)

Thanks.

from mmlib.swaggerforocelot.

rkoczen avatar rkoczen commented on June 10, 2024

from mmlib.swaggerforocelot.

Burgyn avatar Burgyn commented on June 10, 2024

Great.

Of course, when you implement it (maybe I'll make some corrections 😉), then I will release new version to nuget.

Thanks a lot.

from mmlib.swaggerforocelot.

rkoczen avatar rkoczen commented on June 10, 2024

from mmlib.swaggerforocelot.

rkoczen avatar rkoczen commented on June 10, 2024

It looks I don't have rights to push my branch

from mmlib.swaggerforocelot.

Burgyn avatar Burgyn commented on June 10, 2024

Yes. You must creat it in your fork. And then creat PR.

from mmlib.swaggerforocelot.

rkoczen avatar rkoczen commented on June 10, 2024

Sorry but I have still problem with ssh i don't have any idea :(

Could I send You solution by email or etc ?

from mmlib.swaggerforocelot.

Burgyn avatar Burgyn commented on June 10, 2024

Hello,
The standard way to contribute to OpenSource on GitHub is as follows:

  1. Create a fork to your repository.
  2. Implement your changes in the new branch.
  3. Push changes to your origin.
  4. Create PR.

If you have problem with creating PR from your repo, than send me link to your fork.

from mmlib.swaggerforocelot.

rkoczen avatar rkoczen commented on June 10, 2024

from mmlib.swaggerforocelot.

Burgyn avatar Burgyn commented on June 10, 2024

OK, but it strange.

Can you upload your solution somewhere and send me a link for it?

from mmlib.swaggerforocelot.

rkoczen avatar rkoczen commented on June 10, 2024

http://www.common-soft.pl/MMLib.SwaggerForOcelot.rar

I am fighting for few hours with this ssh, and i do'nt have solution yet:(

maybe quicker be like this.

Please let me know what You think.

from mmlib.swaggerforocelot.

Burgyn avatar Burgyn commented on June 10, 2024

Hi, I created PR #29, where I implement your changes. (I changed it a bit, because of better understanding)

Please check it, if you are ok with these. Next I'll merge these and release new version.


I don't understand why you have a problem with SSH when you push to your repository. Are you sure you are pushing changes to your fork?

from mmlib.swaggerforocelot.

rkoczen avatar rkoczen commented on June 10, 2024

Its look great:)

About SSH i don't have any idea, i need check my whole computer.

from mmlib.swaggerforocelot.

Arslan-Munir avatar Arslan-Munir commented on June 10, 2024

It has been great to work with Ocelot and swagger.
But here is a strange behavior I am getting.
When I use app.UseSwaggerForOcelotUI with opts.SwaggerEndpoint, it duplicates the swagger documentation for each down services.

I can also integrate down services swagger directly by using app.UseSwaggerUI with SwaggerEndpoint. Here I don't need any configuration and no need of app.UseSwaggerForOcelotUI

1
2

Can anyone please tell me what is the right way to get the down services documentation?

from mmlib.swaggerforocelot.

Burgyn avatar Burgyn commented on June 10, 2024

Hi @Arslan-Munir,
Sorry, I'm outside of computer (vacation with family). I'll look at it when I get back.

Please, can you create new issue for this?
Thanks.

from mmlib.swaggerforocelot.

Arslan-Munir avatar Arslan-Munir commented on June 10, 2024

Hi @Burgyn
Sure I will create this as a new issue.
Thanks.

from mmlib.swaggerforocelot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.