Git Product home page Git Product logo

Comments (7)

liamnichols avatar liamnichols commented on May 27, 2024 2

You’re right, it looks like only entity documentation is supported right now, but adding it for paths and parameters would make total sense!

I think it’s probably a bit tricky, because we can generate paths in multiple styles, but still it would be good to have 🙂

I’ll label this as an enchantment and dig a little deeper when I get some time, thanks for raising!

from createapi.

kean avatar kean commented on May 27, 2024 2

Starting with Xcode 14, DocC is the best option for generating documentation. But you don't need to do anything to support it (as long as the documentation comments are there). But ideally, you'd want to provide DocC extension files to make logical groups of APIs.

from createapi.

liamnichols avatar liamnichols commented on May 27, 2024

Interesting... If you comment out all of the options under comments in your config file, does it make any difference?

I thought that it might be related to -s, but that doesn't seem to impact any of the fixtures: https://github.com/CreateAPI/CreateAPI/blob/main/Tests/CreateAPITests/Expected/petstore-split/Sources/Entities/Pet.swift

from createapi.

liamnichols avatar liamnichols commented on May 27, 2024

Never mind, I cloned your repo and it didn't make any difference.

I had a glance at the App Store Connect Schema and I can't actually see any title or description fields defined for the component schemas (entities). Can you point me to a specific example of an entity that you are expecting to be documented? I didn't dig too deep so might have missed something

from createapi.

AvdLee avatar AvdLee commented on May 27, 2024

Right, I see! Does that mean CreateAPI only support entity documentation?

I expected these examples:

, {
          "name" : "include",
          "in" : "query",
          "description" : "comma-separated list of relationships to include",
          "schema" : {
            "type" : "array",
            "items" : {
              "type" : "string",
              "enum" : [ "offerCode" ]
            }
          },
          "style" : "form",
          "explode" : false,
          "required" : false
        }

Containing a description:

"description" : "comma-separated list of relationships to include",

To be used to fulfill documentation 🤔

from createapi.

AvdLee avatar AvdLee commented on May 27, 2024

@liamnichols awesome, I think it would be a great addition! Let me know if you need any more feedback or info to get started 💪🏼

from createapi.

LePips avatar LePips commented on May 27, 2024

While this discussion was originally about the comments in the schema for Swift generation, I think that also providing the option for a markdown file would be a good way of documenting the paths as well. For very, very, very large schemas can be a lot easier to reference, especially when they're grouped together and you can search on the page.

As an example, here are all my paths documented by the OpenAPI generator: https://github.com/jellyfin/jellyfin-sdk-swift/blob/main/README.md

It would suffice to provide the sourcery templates that can parse the generation. OpenAPI also generated markdown for objects but I personally don't care for those.

from createapi.

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.