# Keyword not detected in libdoc generated documentation

**URL:** <https://forum.robotframework.org/t/keyword-not-detected-in-libdoc-generated-documentation/6727>\
**Category:** Robot Framework\
**Created:** [26 January 2024 18:42 UTC](https://forum.robotframework.org/t/keyword-not-detected-in-libdoc-generated-documentation/6727 "2024-01-26T18:42:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![khl](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@khl](https://forum.robotframework.org/u/khl)\
**Post date:** [26 January 2024 18:42 UTC](https://forum.robotframework.org/t/keyword-not-detected-in-libdoc-generated-documentation/6727/1 "2024-01-26T18:42:24Z")

</div>

Hi,  
I am trying to generate a documentation for some Robot framework keywords. However, I found that libdoc is not detecting python keywords defined inside class.  
Here’s a simple example were I was able to replicate this behavior:

```
"""
Module for testing keyword generartion in class
"""

from robot.api.deco import keyword

class TestClass:
    """
    Test class
    """
    @keyword
    def new_test_keyword(self):
        """
        A test keyword
        """
        pass

```

I am running “libdoc -F rest \<file\_path\> \<target\_html\>” and the keywords does not appear in the generated documentation. However, if I write the same keyword outside the class, it works perfectly.

Am I missing anything here?

---

<div class="post-metadata">

**Author:** ![robinmackaij](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/robinmackaij/32/126_2.png) [@robinmackaij](https://forum.robotframework.org/u/robinmackaij)\
**Post date:** [27 January 2024 17:35 UTC](https://forum.robotframework.org/t/keyword-not-detected-in-libdoc-generated-documentation/6727/2 "2024-01-27T17:35:23Z")

</div>

The class is not decorated with the `@library` decorator from `robot.api.deco`. I suspect that is the reason. Also, the name of the class should be the same as the name of the Python file it resides in (i.e. TestClass.py).
